Calculator Input Methods - Reverse Polish Notation (RPN) (postfix Notation)

Reverse Polish Notation (RPN) (postfix Notation)

In reverse Polish notation, also known as postfix notation, all operations are entered after the operands on which the operation is performed. Reverse Polish notation is parenthesis-free which usually leads to fewer button presses needed to perform an operation. By the use of stack one can enter formulas without the need to rearrange operands. An example of a calculator which uses RPN is the HP 48G.

Examples
Formula Key strokes Key stroke count
1 ↵ Enter 2 ↵ Enter 3 × + 7
3 0 SIN 3 0 COS × 7
5 ↵ Enter 3 - 4
1 5 ↵ Enter 1 0 + 1 0 + 1 0 + 12

Note example 1 which is one of the few examples where reverse Polish notation does not use the fewest button presses – provided one does not rearrange operands. If one would do so then only 6 key strokes would be needed.

Read more about this topic:  Calculator Input Methods

Famous quotes containing the words reverse and/or polish:

    Now listen, buddy, there are a few corny ideas you got to get out of your head if you’re going to fly an airplane. Most things are just the reverse from what people think. The higher you are the safer you are. The Earth down there, that, that’s your enemy because once you hit that, boy, you splatter.
    Dalton Trumbo (1905–1976)

    It has always been my practice to cast a long paragraph in a single mould, to try it by my ear, to deposit it in my memory, but to suspend the action of the pen till I had given the last polish to my work.
    Edward Gibbon (1737–1794)