L() and G() sample



#2

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


#3

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.


#4

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.

#5

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


#6

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


#7

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


#8

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


#9

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


Possibly Related Threads...
Thread Author Replies Views Last Post
  Sample variance? Bruce Bergman 1 165 10-11-2013, 07:30 AM
Last Post: Nick_S
  Simple sample programs for the HP-41CX? Tom Lewis 5 358 03-25-2013, 07:11 PM
Last Post: Allen
  Sample problems to evaluate RPL vs. RPN "objectively" Gene 18 800 02-22-2006, 06:48 AM
Last Post: Valentin Albillo
  82143A sample printout request Eric Smith 2 210 06-12-2005, 08:42 AM
Last Post: Hank Jostock

Forum Jump: