The Museum of HP Calculators

HP Forum Archive 18

HP 20b: +/- and ANS (or CHS and LASTx)
Message #1 Posted by Thomas Klemm on 26 Dec 2008, 6:13 p.m.

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

 Re: HP 20b: +/- and ANS (or CHS and LASTx)Message #2 Posted by valentino ducati on 26 Dec 2008, 7:24 p.m.,in response to message #1 by Thomas Klemm 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

 Re: HP 20b: +/- and ANS (or CHS and LASTx)Message #3 Posted by Thomas Klemm on 26 Dec 2008, 8:07 p.m.,in response to message #2 by valentino ducati 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 - + ```

Go back to the main exhibit hall