Download Print this page

HP 12C Platinum Instruction Manual page 4

Using the rpn stack to solve problems efficiently
Hide thumbs Also See for HP 12C Platinum:

Advertisement

hp calculators
HP 12C Platinum Using the RPN stack to solve problems efficiently
Under certain circumstances, keeping track of whatever is in each stack register is not practical for daily, quick
computations. To help viewing the stack contents, two functions are an aid: ~ (X exchanges Y contents) and d
(roll-down all stack registers contents). Keeping previous contents as they are, let us try the following keystroke:
T
44.00
Z
33.00
Y
22.00
X
11.00
d
Using Last-x contents in chain calculations
The L-register is automatically updated anytime the X-register contents are changed. In this case, the L-register is
loaded with a copy of the last value in X prior to executing the function, hence the reference Last x. Whenever possible,
using L-register contents in chain calculations avoids numbers or intermediate results to be typed in again. The L-
register's contents can be retrieved to the X-register anytime it is needed with the sequence gF.
Example 4: What is the shortest keystroke sequence to find y value in the following expression given x=3.4567?
Solution:
The shortest keystroke sequence to compute y is:
3.4567 gr gF g¿ 2 § +
When gr is pressed after 3.4567 is keyed in, the L-register is loaded with 3.4567
register contents, before the square is applied. Right after gr, gF retrieves L-register contents
back to the X-register
causes the stack contents to be lifted because gF in fact acts like a number entry, as if 3.4567 is
keyed in. The sequence g° 2 §
it can be seen, the 2
3×ln(x) are correctly located in the stack and +
diagram below shows each operation and the related stack register contents. a, b, c, d and l are any
random values previously in the stack registers. The dashed arrow indicates the first number entry, while
straight-line arrows indicate L-register contents change and use.
hp calculators
11.00
22.00
44.00
11.00
33.00
44.00
22.00
33.00
d
(2)
so ln(x) can be calculated. What must be remembered is that gF also
(3)
key enters a value in the X-register, so the stack is lifted. Now both x
22.00
22.00
11.00
11.00
33.00
44.00
44.00
33.00
~
~
=
+
×
y
x
2
ln(
x
)
(4)
computes the second part of the right side of the equation. As
(5)
computes the answer for the y value at once. The
- 4 - HP 12C Platinum Using the RPN stack to solve problems efficiently - Version 1.0
22.00
44.00
11.00
22.00
33.00
11.00
44.00
33.00
~
d
Figure 5
Figure 6
Figure 7
(1)
, a copy of X-
2
and

Advertisement

loading