240 Appendix A: RPN and the Stack
Arithmetic Calculations with Constants
Because the number in the T-register remains there when the stack drops, this
number can be used as a constant in arithmetic operations. To place the constant
into the T-register, key it into the display (that is, into the X-register), then press
\ three times. This also places the constant in the Y and Z-registers. Each time
an arithmetic operation is then performed — using the constant in the Y-register
and a number keyed into the displayed X-register — the constant will be
"dropped" back into the Y-register.
Example: The annual sales of solar engineering hardware your firm — currently
$84,000 — are projected to double each year for the next 3 years. Calculate the
annual sales for each of those years.
In the example above, the constant was repeatedly multiplied by the result of the
previous operation, which was already in the displayed X-register. In another class
of calculations with constants, the constant is multiplied by (or added to, etc.) a
new number keyed into the displayed X-register. For these calculations, you must
press O before keying in a new number after having pressed an operator key. If
this were not done, the stack would lift when you keyed in a new number after
pressing the operator key, and the Y-register would no longer contain the constant.
(Recall — from page 234 — that the stack does not lift when a number is keyed
into the displayed X-register after O is pressed.)
Enters constant into Y, Z, and
Enters base amount into displayed
Annual sales after first year.
Annual sales after second year.
Annual sales after third year.