|
The RPN
Method: An Overview and History
If you're a frequent calculator
user, you owe it to yourself to investigate the advantages
of RPN. RPN stands for Reverse Polish Notation. Reverse
Polish Notation was developed in 1920 by Jan Lukasiewicz as
a way to write a mathematical expression without using
parentheses and brackets. Hewlett-Packard Co., realizing
that Lukasiewicz's method was superior to standard
algebraic(1)
expressions when using calculators and computers, adapted
RPN for its first hand-held scientific calculator, the HP35,
in 1972.
Why Use RPN?
-
RPN saves time and keystrokes.
You never have to account for the parentheses while
doing calculations. The process is similar to the way
you learned math on paper.
-
You can see the intermediary
results as you perform your computations rather than
just the answer at the end. This is an extremely helpful
byproduct. Math teachers are using this feature to
improve student understanding of mathematics
-
An intermediate result allows
the user to check the results and correct errors more
easily. It's easier to follow the stream of calculation.
The user defines the priority of operators.
-
RPN is logical because the user
first gives the number and then tells what to do with
it.
HP provides full RPN
Hewlett-Packard produces certain
models of calculators with RPN because it is an extremely
powerful yet simple way to perform computation. The HP
12c financial calculator uses RPN exclusively. HP also
recognizes that some customers prefer the traditional
algebraic entry mode. This is why some HP calculators
operate in both RPN and algebraic mode. For example, the new
12c Platinum financial,
17bII+ financial,
33s scientific,
48gII graphing and
49g+ graphing can be switched between the two modes.
RPN is also consistent in its
usage. Most non-RPN scientific calculators are half RPN and
half algebraic. For example, to perform addition, you need
to enter 2+4 (algebraic), but to perform a sine calculation,
you need first to enter the number and then to press the SIN
button, which is a RPN method of entering the equation. HP's
RPN calculators do not suffer from this idiosyncrasy.
Learning RPN Is Easy
Believe it or not, the process of
using RPN is similar to the way you learned math. If you
think about it, you have to modify the way you learned math
in order to use an algebraic mode calculator.
Here's an example
3+5
---
7+6
Or (3+5) / (7+6) = x
Algebraic method: Add 3+5=8. Write
down the answer or store it in memory. Add 7+6=13. Now enter
the 8 from the first answer and then divide it by entering
the second answer to get x=0.62.
RPN method: Touch 3 then the ENTER
key. Touch 5 then the + key. Touch 7, and then ENTER. Touch
6 then the + key. Note that the answer to the second sum is
displayed. Now here's the magic part. Touch the divide key
and the calculator gives the answer, 0.62.
Algebraic: 13 strokes, not counting
the effort to write down or memorize the first answer while
you calculated the second answer.
RPN: 9 strokes, and no need to
write anything down.
How RPN Calculators Work
RPN keeps a record of calculations
by placing them in a stack(2).
In the above example, when you pressed ENTER the second
time, the answer to the first sum was pushed(3)
up in the stack awaiting the next action. After entering the
second sum, pressing the divide key looked at the first sum
and divided it by the second and popped(4)
the answer out of the stack. In other words, RPN performed
the calculation in a logical order.
Learning how to use an RPN
calculator usually takes just a few minutes and it can save
lots of time and effort over the long run. Here is a
practical everyday example that uses RPN.
|
|
$252 |
252 ENTER |
$252 |
|
Spend $23 |
229 |
23 - |
229 |
|
Deposit 30 |
259 |
30 + |
259 |
|
Spend 21 |
238 |
21 - |
238 |
|
Spend 43 |
195 |
43 - |
195 |
|
Spend 21 |
174 |
21 - |
174 |
|
Pay Check: 400 |
574 |
400 + |
574 |
|
Spend 35 |
539 |
35 - |
539 |
|
Spend 74 |
465 |
74 - |
465 |
|
Spend 26 |
439 |
26 - |
26 |
|
Spend 100 |
339 |
100 - |
339 |
|
Spend 10 |
329 |
10 - |
329 |
Every HP calculator designed for
RPN comes with a manual that guides you through sample
problems using RPN. Take a test drive and you will find out
why many of HP's customers have been enthusiastic RPN users
for more than 30 years.
|
(1)
|
Algebraic mode: This is the
name of the mathematic notation used on all non-RPN
calculators where you enter a mathematic equation
like this: 1+3*(3+(2-5)/3). In algebraic mode,
parentheses and order of operations are extremely
important. |
|
(2) |
Stack: A stack, also called
LIFO (last-in, first-out), is the basis of the RPN
system as it is the 'memory' that allows the user to
enter numbers. |
|
(3) |
Push/pushing: This is the
action of adding a number at the bottom of a stack,
pushing all the other numbers up. |
|
(4) |
Pop/popping: This is the
action of removing the last number that was pushed
on a stack. |
|