Mathematical Calculations 17
Figure 5 Duplicating a Number on the Stack
In RPN, the parentheses keys
(D
manipulate the stack. Pressing
(
performs a
roll
down
of the stack. A roll down causes the stack to
roll
towards the bottom of the stack, during
which the number in Level 2 to moves down to Level 1, the number in Level 3 to moves down
to Level 2, the number in Level 4 to moves down to Level 3, and the number of Level 1 to moves
up to Level 4. The
(
key has a small down arrow on it to indicate the roll down feature.
With the numbers entered into the stack shown in the left column in Figure 6, pressing
(
performs the roll down of the stack shown in the right column.
Figure 6 The RPN Stack and the Roll Down Operation
Previous Value
Previous Value
77
77
-15
12
41
23
23
-15
12
41