different levels are referred to as the stack levels, i.e., stack level 1, stack level
Basically, what RPN means is that, instead of writing an operation such as 3
+ 2, in the calculator by using
we write first the operands, in the proper order, and then the operator, i.e.,
As you enter the operands, they occupy different stack levels.
3`puts the number 3 in stack level 1. Next, entering 2`pushes
the 3 upwards to occupy stack level 2. Finally, by pressing +, we are
telling the calculator to apply the operator, or program, + to the objects
occupying levels 1 and 2. The result, 5, is then placed in level 1.
Let's try some other simple operations before trying the more complicated
expression used earlier for the algebraic operating mode:
Notice the position of the y and the x in the last two operations. The base in
the exponential operation is y (stack level 2) while the exponent is x (stack
level 1) before the key Q is pressed. Similarly, in the cubic root operation,
y (stack level 2) is the quantity under the root sign, and x (stack level 1) is the
Try the following exercise involving 3 factors: (5 + 3) × 2
Let's try now the expression proposed earlier:
Calculates (5 +3) first.
Completes the calculation.