SwissMicros | What is RPN?

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 which was developed in 1920 by Jan Łukasiewicz (de.wikipedia) as a way to write a mathematical expression without using parentheses and brackets.
Hewlett-Packard (tm), realizing that Łukasiewicz'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.
Full RPN

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. Our 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:


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: Press 3 then the ENTER key. Press 5 then the + key. Press 7, and then ENTER. Press 6 then the + key. Note that the answer to the second sum is displayed. Now here's the magic part. Press 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.
  • 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.
  • 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.
  • Push/pushing: This is the action of adding a number at the bottom of a stack, pushing all the other numbers up.
  • Pop/popping: This is the action of removing the last number that was pushed on a stack.