Reverse Polish notation

related topics
{math, number, function}
{system, computer, user}
{work, book, publish}
{company, market, business}
{theory, work, human}
{style, bgcolor, rowspan}
{area, community, home}
{game, team, player}

Reverse Polish notation (or RPN) is a mathematical notation wherein every operator follows all of its operands, in contrast to Polish notation, which puts the operator in the prefix position. It is also known as Postfix notation and is parenthesis-free as long as operator arities are fixed. The description "Polish" refers to the nationality of logician Jan Łukasiewicz, who invented (prefix) Polish notation in the 1920s.

The Reverse Polish scheme was proposed in 1954 by Burks, Warren, and Wright[1] and was independently reinvented by F. L. Bauer and E. W. Dijkstra in the early 1960s to reduce computer memory access and utilize the stack to evaluate expressions. The notation and algorithms for this scheme were extended by Australian philosopher and computer scientist Charles Hamblin in the mid-1950s.[2][3]

During the 1970s and 1980s, RPN had some currency even among the general public, as it was widely used in handheld calculators of the time – for example, the HP-10C series and Sinclair Scientific calculators.

In computer science, postfix notation is often used in stack-based and concatenative programming languages. It is also common in dataflow and pipeline-based systems, including Unix pipelines.

Most of what follows is about binary operators. A unary operator for which the Reverse Polish notation is the general convention is the factorial.


Full article ▸

related documents
Linear congruential generator
Euphoria (programming language)
Greedy algorithm
De Moivre's formula
Identity element
Nash embedding theorem
Uncountable set
Parity (mathematics)
Normal subgroup
Chomsky normal form
Box-Muller transform
Hidden Markov model
Simple LR parser
CYK algorithm
Lagrange's theorem (group theory)
Binary function
Logical disjunction
Complement (set theory)
Toeplitz matrix
Congruence relation
Lipschitz continuity
Graded algebra
Ordered field