RPN

From OLPC
Jump to: navigation, search

RPN is short for "Reverse Polish Notation", a machine-friendly calculator operating method.

Basically you give the numbers to the calculator first, then tell it what to do with them.

There is no concept of "process" that would require parentheses or brackets as in normal calculators, since this requires more sophistication in the calculator itself. Not only that, it would be more for the user to keep track of.

Suppose you want to add 2.45 to 5.54. First, you key in 2.45. The calculator now has that number. We need to get the second number into the calculator now. So, we create room for it by pressing "ENTER". Now, you key in 5.54.

In Free42, the calculator displays two numbers, so both numbers will now be visible.

The calculator has the numbers, so now you can tell it what to do with them (you want to add them together).

So you press "+" and the calculator gets to work. It presents the answer in the bottom line.

Compare this to normal calculators which force you to follow a "process": First you enter a number, then you define the operation ( + ), then you enter a number, then you press the "=" key to get the answer.

Is either method better than any other? Well, for the simple example shown here, the answer will be "no". Some people think RPN "makes more sense" because the numbers are in the calculator before the process runs. This can lead to confidence in the calculated results too.

Advantages of RPN appear when processing more complex math, but even then, the advantages might not be that great.

Take a look at the following example: ((254 x .25)/4) x pi The easiest way to deal with it if you don't have a calculator that handles parentheses is to start at the innermost place and work your way out.

First we calculate 254 x 0.25. Take that answer and divide it by 4. Take that answer and multiply it by pi.

Here are these steps on a regular calculator (13 keystrokes): 254 x .25 = / 4 x pi = (the answer appears) Some regular calculators (but not all) allow you to skip one keystroke: 254 x .25 / 4 x pi = (the answer appears)

Here are the steps on a RPN calculator (12 keystrokes): 254 ENTER .25 x 4 / pi x (the answer appears)

If your calculator handles parentheses, you just key it in as shown and let the calculator figure it out. What do you learn that way? I don't know.