Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Reverse Polish notation
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Mathematics notation where operators follow operands}} {{Redirect|Operational stack|the English Channel lorry parking procedure |Operation Stack}} {{Use list-defined references|date=December 2021}} {{Use dmy dates|date=April 2019|cs1-dates=y}} {{Operator notation sidebar |logo=[[File:Postfix-dia.svg|125px]]}} [[File:Typing the calculation for "8 times 6" into a pocket calculator HP-32SII which uses RPN logic.webm|thumb|upright|Video: Keys pressed for calculating eight times six on a [[HP-32S|HP-32SII]] (employing RPN) from 1991]] '''Reverse Polish notation''' ('''RPN'''), also known as '''reverse Łukasiewicz notation''', '''Polish postfix notation''' or simply '''postfix notation''', is a mathematical notation in which [[Operation (mathematics)|operators]] ''follow'' their [[operand]]s, in contrast to [[prefix notation|prefix]] or [[Polish notation]] (PN), in which operators ''precede'' their operands. The notation does not need any parentheses for as long as each operator has a fixed [[arity|number of operands]]. The term ''postfix notation'' describes the general scheme in mathematics and computer sciences, whereas the term ''reverse Polish notation'' typically refers specifically to the method used to enter calculations into hardware or software calculators, which often have additional [[side effect (computer science)|side effect]]s and implications depending on the actual implementation involving a [[stack (data structure)|stack]]. The description "Polish" refers to the [[nationality]] of [[logician]] [[Jan Łukasiewicz]],<ref name="Łukasiewicz_1951"/><ref name="Łukasiewicz_1957"/> who invented Polish notation in 1924.<ref name="Łukasiewicz_1929"/><ref name="Hamblin_1962"/><ref name="Ball_1978"/><ref name="Kennedy_1982"/> The first computer to use postfix notation, though it long remained essentially unknown outside of Germany, was [[Konrad Zuse]]'s [[Z3 (computer)|Z3]] in 1941<ref name="Ceruzzi_1980"/><ref name="Rojas_1997"/> as well as his [[Z4 (computer)|Z4]] in 1945. The reverse Polish scheme was again proposed in 1954 by [[Arthur Burks]], Don Warren, and Jesse Wright<ref name="Burks_1954"/> and was independently reinvented by [[Friedrich L. Bauer]] and [[Edsger W. Dijkstra]] in the early 1960s to reduce [[computer memory]] access and use the [[Stack (data structure)|stack]] to evaluate [[Expression (mathematics)|expression]]s. The [[algorithm]]s and notation for this scheme were extended by the philosopher and computer scientist [[Charles Leonard Hamblin|Charles L. Hamblin]] in the mid-1950s.<!-- there might be earlier works on this from the mid-1950s (TBD), but let's already mention some 1957 works --><ref name="Hamblin_1957_1"/><ref name="Hamblin_1957_2"/><ref name="Hamblin_1957_3"/><ref name="Hamblin_1958"/><ref name="McBurney_2008_2"/><ref name="McBurney_2008_1"/>{{excessive citations inline||date=October 2024}} During 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.<ref name="Osborne_1994"/><ref name="Peterson_2011"/> In [[computer science]], reverse Polish notation is used in [[stack-oriented programming languages]] such as [[Forth (programming language)|Forth]], [[dc (programming language)|dc]], [[Factor (programming language)|Factor]], [[STOIC]], [[PostScript]], [[RPL (programming language)|RPL]], and [[Joy (programming language)|Joy]].
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)