RPN : Java Glossary

*0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ (all)

RPN
RPN (Reverse Polish Notation) is a simplified way of writing arithmetic expressions used in FORTH, Abundance and some Hewlett Packard calculators. In is named in honor of the Polish mathematician Jan Łukasiewicz There are no parentheses and there is no operator precedence. Evaluation is strictly left to right, all operands treated the same way. The operators follow the operands.

So
30 40 + 2 * 5 6 + /
means
( 30 + 40 ) * 2 / ( 5 + 6 )

The operands are pushed to stack and operations typically operate on the top two elements, replacing them with the result. Compilers have to convert conventional infix notation to RPN or something similar get clear on the order of execution. Internally the JVM (Java Virtual Machine) works with an RPN-like stack model and RPN-like stack operators.


This page is posted
on the web at:

http://mindprod.com/jgloss/rpn.html

Optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\jgloss\rpn.html
logo
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.
no blog for this page
IP:[65.110.21.43]
Your face IP:[54.204.249.184]
You are visitor number