Emulating L() & G() (HP17/19 origin) on HP49G+



#2

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!


#3

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

FIFA?

Regards,
James


#4

James,

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.

#5

James,

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" :-)

Hth,
Matt


#6

James & Matt,

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

http://www.palmtoppaper.com/PTPHTML/3/ptp3005a.htm

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

#7

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"
functions.

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.

Quote:
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.

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?
Quote:
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.

Regards,
James


#8

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.


#9

Hi,

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 ?

Cheers,

Vincent

#10

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.


#11

Thx. Bill,

BUT:

...
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.
...

http://christophgiesselink.homepage.t-online.de/emu42.htm

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

#12

@All,

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.

DEF
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
value.

....

Example 1: Define a new function that calculates:
(a-b)/(a+b)
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


Possibly Related Threads...
Thread Author Replies Views Last Post
  HP calculators: origin of prefix key labels f and g M Habl 9 2,207 11-21-2012, 08:29 PM
Last Post: Gerson W. Barbosa
  Confused simple accountant: TMV HP17 v HP12 Paul 4 1,255 09-17-2011, 10:12 AM
Last Post: Paul
  HP Solve Issue 19 available - has several articles by museum forum contributors! Gene Wright 17 3,457 07-03-2010, 09:16 PM
Last Post: Diego Diaz
  Origin of the beep melody hecube 0 586 09-05-2009, 04:48 PM
Last Post: hecube
  Op-Amp Gain and Offset Design for the HP-67 Stefan Vorkoetter 6 1,708 12-05-2008, 10:57 AM
Last Post: Tom Mathes
  The silver HP17 B II + (or is it "HP 17 B II ++" ?) Andrés C. Rodríguez (Argentina) 17 3,213 12-24-2007, 05:29 PM
Last Post: Andrés C. Rodríguez (Argentina)
  AMP Rom for 71b PeterP 5 1,567 12-06-2007, 02:20 PM
Last Post: PeterP
  Hp-35s pricing $59.99 -> $79.19 Jerry Hancock 10 2,003 09-18-2007, 10:05 PM
Last Post: Reth
  Short & Sweet Math Challenge #19: Surprise ! [LONG] Valentin Albillo 86 11,313 07-06-2007, 12:29 AM
Last Post: Egan Ford
  HP49G+ and HP49G compatibility Les Wright 17 3,356 06-02-2006, 08:23 PM
Last Post: James M. Prange (Michigan)

Forum Jump: