

Later research clarified that the increased speed from reverse Polish notation may be attributed to the smaller number of keystrokes needed to enter this notation, rather than to a smaller cognitive load on its users. Additionally, users of reverse Polish calculators made fewer mistakes than for other types of calculators. The first reason is that reverse Polish calculators do not need expressions to be parenthesized, so fewer operations need to be entered to perform typical calculations. In comparison, testing of reverse Polish notation with algebraic notation, reverse Polish has been found to lead to faster calculations, for two reasons. In reverse Polish notation, the former could be written 3 4 5 × −, which unambiguously means 3 (4 5 ×) − which reduces to 3 20 − (which can further be reduced to -17) the latter could be written 3 4 − 5 × (or 5 3 4 − ×, if keeping similar formatting), which unambiguously means (3 4 −) 5 ×. While 3 − 4 × 5 can also be written 3 − (4 × 5), that means something quite different from (3 − 4) × 5. An advantage of reverse Polish notation is that it removes the need for parentheses that are required by infix notation. If there are multiple operations, operators are given immediately after their final operands (often an operator takes two operands, in which case the operator is written after the second operand) so the expression written 3 − 4 + 5 in conventional notation would be written 3 4 − 5 + in reverse Polish notation: 4 is first subtracted from 3, then 5 is added to it. In reverse Polish notation, the operators follow their operands for instance, to add 3 and 4 together, one would write 3 4 + rather than 3 + 4. In computer science, reverse Polish notation is used in stack-oriented programming languages such as Forth, STOIC, PostScript, RPL and Joy. ĭuring the 1970s and 1980s, Hewlett-Packard used RPN in all of their desktop and hand-held calculators, and has continued to use it in some models into the 2020s. The algorithms and notation for this scheme were extended by the Australian philosopher and computer scientist Charles L. Dijkstra in the early 1960s to reduce computer memory access and use the stack to evaluate expressions. Consequently, the reverse Polish scheme was again proposed in 1954 by Arthur Burks, Don Warren, and Jesse Wright and was independently reinvented by Friedrich L. Īlmost unrecognized outside of Germany for long, the first computer to use postfix notation was Konrad Zuse's Z3 in 1941 as well as his Z4 in 1945. The description "Polish" refers to the nationality of logician Jan Łukasiewicz, who invented Polish notation in 1924. It does not need any parentheses as long as each operator has a fixed number of operands. Reverse Polish notation ( RPN), also known as reverse Łukasiewicz notation, Polish postfix notation or simply postfix notation, is a mathematical notation in which operators follow their operands, in contrast to Polish notation (PN), in which operators precede their operands.
