If you used a scientific calculator in the 1970s or 1980s, there was a fair chance that it worked differently from almost every calculator you see today. Instead of typing:
2 + 3 =
you entered:
2 ENTER 3 +
There wasn’t even an equals key. Hewlett-Packard made this system — Reverse Polish Notation, or RPN — practically synonymous with serious scientific calculators until other players like TI and Casio got serious. Once you got used to it, ordinary algebraic calculators could feel annoyingly clumsy.
Today, RPN calculators look like a nearly extinct species. HP left the calculator market, licensing the HP calculator line to Moravia Consulting. Old HP-15Cs, 16Cs, 32Ss, 42Ss, and 48s have become collectibles. But RPN isn’t dead. You can still buy new hardware, build your own, or turn almost any computer or phone into a very capable RPN machine. There are reasons some of us still want to.
But Why Polish?
The name goes back to Polish logician [Jan Łukasiewicz], who devised a notation in which operators precede their operands. Instead of writing:
A + B
you can write:
+ A B
The big advantage is that parentheses aren’t required. The structure of the expression tells you exactly what operates on what. Reverse Polish notation simply puts the operator at the other end:
A B +
[Łukasiewicz] wasn’t designing calculators, of course, but the same idea turned out to be extremely convenient for computers and calculators. Your software doesn’t have to remember what operation is in progress. Each operator is ready to go and can simply work on the operands that you’ve already read.
RPN isn’t exactly the way people calculate with pencil and paper, and it certainly wasn’t derived from the slide rule, but there is a similarity in the way you work. With a slide rule, you generally establish some value, operate on it, and continue from the result. When doing a long-hand calculation, you often calculate a subexpression, write down the answer, and use that answer in the next step. You will probably start with the inner parenthesis and work outward, just like someone with an RPN calculator does. RPN formalizes that process with a stack.
Suppose you want:
(3 + 4) × (5 + 6)
On a conventional calculator, you either need parentheses, or you have to calculate one result and remember it. On an RPN calculator:
3 ENTER 4 + 5 ENTER 6 + ×
The first + leaves 7 on the stack. The second leaves 11 above it. The multiply consumes both and leaves 77.
Notice what’s missing: parentheses, an equals key, and any need to tell the calculator about precedence. This isn’t much of a win for a five-key calculation. It becomes more apparent with something like computing the value of a bunch of parallel resistors:
R=1/(1/R1+1/R2+1/R3…)
An RPN user can calculate each reciprocal, add it to the running result on the stack, and finally take the reciprocal. Intermediate answers stay in the calculator naturally instead of being stuffed into memory registers or enclosed in increasingly impressive collections of parentheses.
Is RPN better? Calculator users have been arguing about that for half a century. But once RPN gets wired into your fingers, it can be surprisingly hard to give up.
Continue reading ““I’m Not Dead Yet!” Reverse Polish Notation Calculators You Can Still Buy”







