Reverse Polish Notation - Practical Implications

Practical Implications

  • Calculations occur as soon as an operator is specified. Thus, expressions are not entered wholesale from right to left but calculated one piece at a time, most efficiently from the center outwards.
  • 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.
  • In RPN calculators, no equals key is required to force computation to occur.
  • RPN calculators do, however, require an enter key to separate two adjacent numeric operands.
  • Users must know the size of the stack, because practical implementations of RPN use different sizes for the stack. For example, the algebraic expression , if performed with a stack size of 4 and executed from left to right, would exhaust the stack. The answer might be given as an erroneous imaginary number instead of approximately 0.5 as a real number.
  • When writing RPN on paper, adjacent numbers need a separator between them. Using a space requires clear handwriting to prevent confusion. For example, 12 34 + could look like 123 4 +, while something like 12, 34 + is straightforward.

Read more about this topic:  Reverse Polish Notation

Famous quotes containing the words practical and/or implications:

    Whether there be any such moral principles, wherein all men do agree, I appeal to any, who have been but moderately conversant in the history of mankind, and looked abroad beyond the smoke of their own chimneys. Where is that practical truth, that is universally received without doubt or question, as it must be, if innate?
    John Locke (1632–1704)

    The power to guess the unseen from the seen, to trace the implications of things, to judge the whole piece by the pattern, the condition of feeling life in general so completely that you are well on your way to knowing any particular corner of it—this cluster of gifts may almost be said to constitute experience.
    Henry James (1843–1916)