The Museum of HP Calculators

HP Forum Archive 18

[ Return to Index | Top of Index ]

HP 20b: and ANS (or CHS and LASTx)
Message #1 Posted by Karl Schneider on 26 Dec 2008, 7:13 p.m.

Hi, Thomas --

(NOTE: Again, some strange glitch in HTML, MoHPC Forum software, or my web browser prevents me from responding directly.)

Thanks for bringing this up. I haven't experimented much with the HP-20b since receving one, nor have I perused the Learning Modules.

It seems that "ANS" serves as "LASTx" in RPN mode. Indeed, the crux of the error is that the "+/-" operation replaces what had been available before, unlike traditional "LASTx", which did not replace the L-register, because another "+/-" or "CHS" could undo it.

Since I don't see "x< >y" or "SWAP" on the HP-20b (I'm sure it's hidden somewhere), I'll exploit commutativity of addition:

3.4567 [shift][sqrt][shift][ANS][shift][1/x][shift][ANS][shift][LN] 2[*][-][+/-][+]

This uses the same number of keystrokes.

Traditional RPN:

3.4567 [ENTER][ENTER][sqrt][x<>y][LN] 2 [*][+][x<>y][1/x][-]

(This omits any necessary shift keys.)

-- KS

Edited: 26 Dec 2008, 7:21 p.m.

      
Re: HP 20b: and ANS (or CHS and LASTx)
Message #2 Posted by Thomas Klemm on 26 Dec 2008, 8:11 p.m.,
in response to message #1 by Karl Schneider

Quote:
I'm sure it's hidden somewhere

)x

Quote:
3.4567 [shift][sqrt][shift][ANS][shift][1/x][shift][ANS][shift][LN] 2[*][-][+/-][+]

This can still be improved by one keystroke:

3.4567
[shift][sqrt]
[shift][ANS]
[shift][1/x]
2
[shift][ANS]
[shift][LN]
[*]
[-]
[-]
            
Re: HP 20b: and ANS (or CHS and LASTx)
Message #3 Posted by Karl Schneider on 27 Dec 2008, 2:08 a.m.,
in response to message #2 by Thomas Klemm

Ah! Those cris-crossing arrows represent the "exchange/swap" operation; I thought it was a pair of scissors for cut-and-paste. Actually, it's clever to use a pair of keys for double-duty: parentheses for algebraic; roll_down and exchange for RPN.

So, I guess "ANS" retains the result of the previous calculation, explaining why "+/-" changes the result of ANS, but entering new data ("2" in your example) does not -- at least, until another operation is completed. ANS is therefore not a direct replacement for LASTx.

The "Traditional RPN" method also takes 13 keystrokes on the HP-20b after entering the value of x:

3.4567 
ENTER ENTER
shift sqrt
)x
shift LN 
2
*
+
)x
1/x
-

-- KS

Edited: 27 Dec 2008, 3:09 a.m.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall