Still in awe over HP50g
#1

I know I'm a random contributor and biased toward the 50g (but still like the 35s, 33s, and 20s). Looking at the "recursive programming" examples in the AUR, I recalled the number of nested subroutines of the 35s, which is 20. But the 50g has this ability only limited by its memory, and can "unwind" this nesting with amazing speed.
As an illustration, this program will run through recursions of itself until the limiting number is reached (1000 here), then unwind through the "end"s in just a fraction of a second. If you make it 2000 loops, it barely becomes noticable that it is busy "ending" the loops and finishing the program.
<< 1 + DUP IF 1000 =/= THEN DUP 1 DISP RECUR END >>
Store in 'RECUR' and start with a 0 in the stack. Pretty amazing, no?
cheers, Glenn

#2

Hi, Glenn;

I wrote a small recursive program (recursive programs tend to be small while doing big things...) for DFS - Depth-First Search - using matrix representations for graphs. I still need to refine it because it has some parts that might be reduced, but it calls itself each tine a vertex is found in a branch being searched. Because it uses local and global variables and it is not optimized, searching takes a lot of time and adding new branches causes the program to take some considerable extra time. It does not use Dijkstra's algorithm, the idea is just to show that it must test all possibilities, not only the shortest path.

I wrote it to show my students that if an HP50G could handle DFS with such a small code, they would be able to do that with Delphi easily.

It´s been two years and none of them has yet beaten my listing...

User RPL is amazing, ahn?

Cheers.

Luiz (Brazil)


Edited: 15 Aug 2010, 8:13 p.m.

#3

Thank you, Luiz, for your input - I don't know much about your subject but appreciate having something new to explore. I found so many additional tips and info for the 50g and RPL in general through this forum and other posts (Graham Kendall?), and I hope that by sharing random stuff that somebody new to this system will have more to work with. Cheers, Glenn

#4

I have the same awe but for a different reason. I enjoy playing with C code on the 50g and it's hard to believe that this little hand-held device is as fast as a desktop PC from 10 or 15 years ago.

#5

I've had a 49g+ since 2004 (updated to a 50g not because I really needed to, but when Circuit City put them on clearance when they went out of business I figured why not) and have been in awe of it continuously ever since. It makes me feel like I'm living in the future every time I use it. For some people, they'd need a flying car to feel like that. For me, it's a pocket (more or less...) calculator that can do algebra.



Possibly Related Threads…
Thread Author Replies Views Last Post
  hp50g screen weird line Sok-khieng Chum Hun 2 1,570 09-10-2013, 08:11 AM
Last Post: Sok-khieng Chum Hun
  Documentation about Hp50g / 49g+ / 48gII and wikis Pier Aiello 9 2,851 09-10-2013, 04:22 AM
Last Post: Software49g
  "A Penny for your thoughts" on the HP50g Tom Grydeland 3 1,674 08-01-2013, 03:57 AM
Last Post: Les Koller
  Is there a HP50g emulator for Linux? Matti Övermark 2 1,485 07-03-2013, 07:40 AM
Last Post: Matti Övermark
  HP50G advanced applications for mathematics CompSystems 0 1,139 06-17-2013, 08:38 AM
Last Post: CompSystems
  HP50g rebind stat key Chris Smith 1 1,118 05-26-2013, 06:21 PM
Last Post: Software49g
  How I use my HP50G at work. David Bengtson 7 2,386 05-06-2013, 02:57 PM
Last Post: Ingo
  HP50g emulator Richard Berler 1 1,152 03-24-2013, 02:43 PM
Last Post: aurelio
  Focus on the HP50g Mic 13 3,439 01-22-2013, 09:18 PM
Last Post: Ronald Williams
  HP50g and rechargeables Chris Smith 11 2,855 01-07-2013, 02:43 AM
Last Post: Derek Walker (UK)

Forum Jump: