## In Reverse Polish Notation, the operators follow their operands.

In RPN calculators, no equals key is required to force computation to occur. To learn more about a programming language using RPN at its core, see Forth. To find a simple RPN implementation and playground, see Firth.

For instance, one would write `3 4 +`

rather than `3 + 4`

. If there are multiple operations, operators are given immediately after their second operands. The expression written `(5 + 10) * 3`

in conventional notation would be written `3 10 5 + *`

in reverse Polish notation.

operation | 3 | 10 | 5 | + | * |
---|---|---|---|---|---|

stack | 3 | 10 | 5 | 15 | 45 |

3 | 10 | 3 | |||

3 |

The automatic stack permits the automatic storage of intermediate results for use later: this key feature is what permits RPN calculators to easily evaluate expressions of arbitrary complexity: they do not have limits on the complexity of expression they can evaluate.

Brackets and parentheses are unnecessary: the user simply performs calculations in the order that is required, letting the automatic stack store intermediate results on the fly for later use. Likewise, there is no requirement for the precedence rules required in infix notation.

Infix | Postfix |
---|---|

3 + 4 | 3 4 + |

500 – 300 | 500 300 – |

6 x 5 | 6 5 * |

20 / 4 | 20 4 / |

*incoming(3)*: firth forth postscript