HP Forums

Full Version: Emulating L() & G() (HP17/19 origin) on HP49G+
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Do you know of a simple way of emulating the behaviour of above functions with a user-defined function or with a program?

I'm using both calculators and want to avoid heavy reprogramming or extensive change of equation and/or program-flow.

Thanks in advance!

Peter A. Gebhardt

PS: Confidence is growing here that Germany could win the FIFA World Championship 2006!

What do the L() & G() functions do?




This paper explains the use & benefits of the functions.

They are not well documented in the documentation of the newer HP17BII+, therefore the reference to the Palmtop archive.

Best regards,
Peter G.


In Peter's reply to your question, "What do the L() & G() functions do?", he may have been referring to this article: Improved TRIG and INVERSE-TRIG functions for the HP-17BII.

Apparently, there were/are problems with implementation of L() and G() on the first 17BII+'s, as well as later rev. 17BII+'s. I say "apparently", because I don't own a 17BII+, so I can't verify this first hand. Here is one thread, and another, concerning problems on the 17BII+ calculators.

Your second question, "FIFA?", is an abbreviation for: Federation of International Football Associations, which refers to the World Cup Soccer Tournament taking place now in Germany.

Alternatively, I guess FIFA could stand for "First In First Aus" :-)


James & Matt,

I'm awfully sorry forgetting to post the proper URL I referred to:


Besides this paper and the one Matt mentions, Matt correctly points to last years, Bob Wang initiated / led discussion(s) around the problems conc. the implementation of the functions in question on the latest HP17BII+ models.

Matt is also absolutely right in translating FIFA.

Best regards

Peter Gebhardt

Ah, I did look at the owner's manuals for the 17BII and 19BII, but
didn't find anything on those functions. What first came to my
mind were "Least" and "Greatest". Pages 10 through 22 of the
"Technical Applications" manual for the 27S and 19B have
information on them, and it turns out that they're "LET" and "GET"

Not having one of those calculators, I'm still not entirely clear
on what those functions do, or just why I'd want to use them.

The LET function rather reminds me of RPL's | (where) function,
but as for the GET function, nothing comes to mind, but also see
the related QUOTE and APPLY functions.

Some uses of |, QUOTE, and APPLY are discussed in HP-48
Insights Part II, Problem Solving Resources
, available on
the Museum CD-ROM set / DVD. Also, in general, see chapter 14,
HP Solve in Insights.

Your second question, "FIFA?", is an abbreviation for: Federation
of International Football Associations, which refers to the World
Cup Soccer Tournament taking place now in

That explains it. I don't follow such "spectator sports", but
usually I can't help being at least somewhat aware of them. But
soccer doesn't get much news coverage in the U.S.A.; sort of a
cross between "kickball" and hockey, isn't it?
Alternatively, I guess FIFA could stand for "First In First Aus"

Strangely enough, I recognized the resemblance to "First In, First
Out", and "First In, First Aus" was the first thing that came to
mind, although it's a mixed language phrase.


Hi James,

The reason you can't see what Let and Get would be for, is that they serve no useful purpose on a fully functional programming system.

The equation solver paradigm of the 18c and its derivatives (19b 19bii 17b, 17bii) is not a full programming language. Recursives, subroutines, loops, branches etc are limited or nonexistent.

Without going into the technical details I will say that the let and get functions put more programmability into the mix, allowing the user to create some more advanced structures rather than straight formula solving.

In a fully-programmable machine, whether it be RPN or RPL, such a tool seems ungainly and strange, because there is no need for it. In the 17bii or etc, it is an amazing "treat" or "icing on the cake." The beauty of the equation solver paradigm is its simplicity, directness, readabity and clean intuitive user interface. For amny many problems, it is the nicest tool I've ever seen. The Let and Get sort of reminds me of "synthetics" on the 41c, in the sense that, oh wow, you can do a lot more with this than I thought! I wonder if it was an "internal HP" tool that somewhere along the way, womeone decided really aught to be leaked. This is just me hypothesizing.

Essentially the only reason I can see trying to emulate it, is so that a person who is familiar with the equation solver paradigm can work on a different platform without learning new things.

I think somebody, perhaps Christoph Gieszlink (spelling?) or Rastprogrammer wrote an emulator for the 17b or the 19b or 27s to run on the 48GX.

I could also be wrong. Come to think of it, Christoph wrote Windows emulators of the 27s/17b and the 42s.

Thx. Bill,


Like all emulators Emu42 needs a ROM image for each emulated calculator to work. I have no license to publish them, so they aren't included in the emulator package.


As far as I remember, there is a very complicated route (including the IR interface of the HP17) to generate a proper HP17 ROM image :-(

Best regards,

Peter A. Gebhardt


It seems the CAS command DEF will be able to replace the L() function! G() then becomes the equivalent of calling the newly defined function.

Type: Function
Description: Defines a variable or a function. Works like the DEFINE command, except that it returns a
result and can be included in an algebraic expression. Given an expression as input, DEF
stores the expression, unlike STORE which evaluates the expression and stores the numerical


Example 1: Define a new function that calculates:
Command: DEF(NEW(A,B)=(A-B)/(A+B))
Result: NEW(A,B)=(A-B)/(A+B)

Example 2: Check that the newly defined function works:
Command: NEW(2,1)

(from AUR pp. 4-20)

Best regards

Peter A. Gebhardt


To go more in depth on L() and G():

These functions let you create and recall intermediate variables. They also provide you with an variable affectation mechanism, which does not normally exist in a 'pure' equation solving environment. Using G(A) instead of just 'A' ensures that the variable will remain hidden from the menu. When you use L() and G() to create statements rather than values, it is commun to prefix them with 0x, so that their return value has no side effect: for example, 0xL(A:SIN(X)/X)+3*G(A)^2+G(A)+4 will affect A while not 'polluting' the expression with the value of A.

If you couple this with the Sum function, you get a possibility to create true definite loops rather that just sums; add the IF statement, and you get conditionals - this starts looking like BASIC, does'nt it ?
The limitations are the following:

1/You can't create you own subroutines/functions. A pity really - something like DEF SIN(X)=<definition of a sine> would allow the 17BII+ not only to have trigs, but to reuse them in programs.

2/You can't have indirect adressing except read-only when you iterate on lists; that makes it impossible to create your own lists or arrays within programs

3/You can't have indefinite loops, the number of times you iterate must be known before entering the loop (you can however simulate indifinite loops by looping a number of times which is for sure higher that the maximum possible, and get the same effect, albeit in a slower manner).

Despite these limitations, these abilities makes the 17BII/19BII/27S/200LX a joy to program, in a concise BASIC fashion, fully integrated with the powerful and elegatant solver ! that's why I am a bit disgusted to hear sometimes these machines reffered to as 'non programmables'.

It is pretty easy to emulate L() and G() in RPL: the arrow '->' allows to create local variables, know only to the block they create, and they can be recalled easily just by typing their name; less concise, though... and I could't find in RPL the equivalent of the S() function which allows to mix several equations into one depending on which value you want to solve for. Anyone ?