HP Forums

Full Version: HP 20b: and ANS (or CHS and LASTx)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

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.

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]
[*]
[-]
[-]

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.