The Museum of HP Calculators

HP Forum Archive 19

[ Return to Index | Top of Index ]

L() and G() sample
Message #1 Posted by Sancerre (Phoenix) on 13 Apr 2009, 12:07 a.m.

Hi,

A while back, (3/17/2009) to be exact, there was a long thread concerning a solver equation that would be able to solve (iteratively) two unknowns. During that thread, it was mentioned that the Let/Get functions did not have a clean translation when ported over to the 49/50G.

Can some provide an appropriate example of using Let/Get with either the 17BII/19BII? I've been 'playing around' a bit with RPL and would like to see whether there are some routines that could easily mimic the functionality.

Regards,

Tod

      
Re: L() and G() sample
Message #2 Posted by Don Shepherd on 13 Apr 2009, 2:54 a.m.,
in response to message #1 by Sancerre (Phoenix)

The purpose of the Let and Get functions in the 17Bii, I would say, is to allow "local" variables; that is, variables that will not appear in the menu and that the user will never see. This functionality, along with the sigma and IF functions, allows the 17Bii solver to operate somewhat as a "programming" language. The Let function allows you to assign a value to a local variable, and the Get function allows you to reference that variable without it appearing in the menu.

L(A:12*INT) loads local variable A with 12 times variable INT
G(A) references the current value of local variable A
The variable A will not appear in the menu.

I don't know much about RPL and the 50g, or how its menu system works, but I assume that local variables are no problem on that system, since it is a "real" programming system.

            
Re: L() and G() sample
Message #3 Posted by Sancerre (Phoenix) on 13 Apr 2009, 9:37 a.m.,
in response to message #2 by Don Shepherd

That is just what I thought. I suggested that the 50G solver could handle pretty much anything you threw at it. The 'problem' stated was that you could not (easily) port over formulas from the 17BII/19BII due to let/get. I am looking for an example of a problematic formula so that I can find a solution to the problem.

      
Re: L() and G() sample
Message #4 Posted by Peter A. Gebhardt on 13 Apr 2009, 6:38 p.m.,
in response to message #1 by Sancerre (Phoenix)

Tod,

I've brought that issue up in the following threads:

http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/archv016.cgi?read=94969

http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/archv016.cgi?read=99856

I didn't follow-up on using this proposed solution for myself, because I "fell in love" with the 200LXs shortly afterwards ... ;-))

Best regards,

Peter A. Gebhardt

            
Re: L() and G() sample
Message #5 Posted by Sancerre (Phoenix) on 13 Apr 2009, 6:53 p.m.,
in response to message #4 by Peter A. Gebhardt

Thanks Peter,

I actually found the post, but hadn't had a chance to update the thread. Can you provide a typical formula that you might want to port over to the 50G?

I would like to take a look at the problem just for the challenge. Besides, you might end your love affair one day, and perhaps I'll have a solution for you. By the way, I am a huge fan of the 17BII, and I found a 19BII recently just because I had too. However, the display and connectivity of the 50G are just too much to ignore.

--Tod

                  
Re: L() and G() sample
Message #6 Posted by Peter A. Gebhardt on 14 Apr 2009, 4:39 a.m.,
in response to message #5 by Sancerre (Phoenix)

Tod,

one of the most useful, albeit also most challenging apps is found here:

http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/articles.cgi?read=234

This is W. Bruce Maguire II's fine work on implementing a refined & faster version of the "basic" FMRR algorithm found in Chris Coffin's book.

Thanks for taking the challenge of this issue of portability!

Peter A. Gebhardt

                        
Re: L() and G() sample
Message #7 Posted by Sancerre (Phoenix) on 15 Apr 2009, 10:36 a.m.,
in response to message #6 by Peter A. Gebhardt

Peter,

Admittedly that is a bit more complicated than I had wished. I'll put together a simple formula that uses let/get first; then I'll add using cash flows. I'll keep you posted.

--Tod

                              
Re: L() and G() sample
Message #8 Posted by Peter A. Gebhardt on 15 Apr 2009, 6:23 p.m.,
in response to message #7 by Sancerre (Phoenix)

Tod,

I've choosen the example above, because it is well tested already in it's native SOLVER form on the old 17bII to the newest 17bII+ and it shows the deficiencies of my proposed approach - declining readability of the resulting code after "parsing" it to some 50G compatible code.

It was not meant to stress your willingness or ability to tackle the problem ;-))

Thanks again for taking on the challenge!

Peter A. Gebhardt


[ Return to Index | Top of Index ]

Go back to the main exhibit hall