HP 20b: +/- and ANS (or CHS and LASTx)



Post: #4

HP 20b Using the RPN stack to solve problems efficiently

This solution works on all RPN-calculators I know but gives -0.91 on HP 20b instead. The reason is that +/- copies register X to ANS. Thus the 2nd ANS returns 1/x instead of x.

Microchallenge: Can you help HP and find the correct sequence?

Here's the link to get all HP 20b Training Modules.


Post: #5

Prologue



Despite the fact the 20b has a RPN mode, it has a strange "new" behaviour, contrary to the also new 35s and the dozens of classic hp RPN calculators:



ENTER after numeric keystrokes doesn't copy X to Y but it does only finalize the input buffer (it isn't X) and copy it to the 1st stack register in 20s.




Incredible, but it works like the high end RPL models. I don't know why they choose to change this important detail of RPN input paradigma...



Back to topic: That's why there is one more INPUT keystroke in my proposition below.



Possible solution


3,4567 INPUT

INPUT

shift SQR

2 ANS

shift LN

x

+

X<>Y

shift 1/x

-



20 keystrokes and right answer: 4,05


Post: #6

You've cheated a little since ANS is shifted. But still we can do it with 20 keystrokes:

3.4567
shift SQRT
shift ANS
INPUT
shift LN
2
*
)x
shift 1/x
-
+

Forum Jump: