B.   Why RPN?

RPN makes a calculation a sequence of decisions about values: take these numbers, perform this operation, inspect the result, and continue. That can be a comfortable way to work when a calculation develops in stages. ALG makes the written expression the organizing structure. That can be more comfortable when the main task is to transcribe a formula and check that its grouping is correct.

Both approaches can express the same arithmetic. The useful question is which one helps you keep track of the work in front of you. This appendix explains RPN’s practical appeal, its costs, and the evidence behind some of its reputation. For instruction in the actual keys, see chapter 3, chapter 4 and chapter A.

In the RPN examples, X is the main value, labeled S0 in the full-stack view; Y is the next position, labeled S1 there. These names identify current stack positions; the separate Last X and Last Y registers save earlier operands for recovery.

B.1   A calculation built from intermediate results

Suppose a calculation has two subtotals that must eventually be multiplied. With RPN, you calculate the first subtotal and leave it on the stack. You then calculate the second while retaining the first. Multiplication consumes those two results. The stack supplies temporary storage without requiring you to name a memory register for every partial answer.

This is the practical meaning of putting an operator after its operands. When you press an ordinary arithmetic operator, the values it needs are already present. You do not have to ask whether a multiplication is still pending or whether a later parenthesis will change which addition is performed first. You do have to know which values are currently in X and Y.

Two subtotals, then one multiplication

Calculate
\[ (2+3)(4+5)=45. \]

Select RPN, real mode, the default five-register stack, and FIX 4. Use the default working precision of 600 digits; the angle setting does not affect this example. With no pending command or active shift, clear the stack using f CLEAR, the orange function of the reciprocal key, as described in section 2.8.

1.
Press 2 ENTER 3 +. The first subtotal is 5.0000 in X.
2.
Press 4 ENTER 5 +. The second subtotal is 9.0000 in X; the first remains 5.0000 in Y.
3.
Press \(\times \). The answer is 45.0000 in X.

There is no extra ENTER between the first addition and the next number. Starting that number lifts the existing subtotal automatically.

The ability to stop at meaningful intermediate results is useful beyond textbook expressions. You might first obtain an area, then multiply by a rate, then add a fixed amount. At each stage you can ask whether the units, sign, and approximate size make sense. RPN supports that habit directly; it does not perform the reasoning for you. A plausible-looking subtotal can still come from the wrong inputs.

The stack also has a cost: its values are not labelled “area,” “rate,” or “subtotal.” Their roles remain yours to remember. The full-stack view shows the numbers, not the formula that produced them. For values that must survive unrelated work, use the memories in chapter 6 rather than relying on their current positions.

B.2   What ALG offers in return

ALG keeps a different kind of context visible: the expression itself. In SpicyRPN’s real and complex ALG displays, you can compare that expression with the formula you intended to enter. Parentheses record grouping, and precedence determines which operations are performed first. SpicyRPN’s ALG mode is an expression-entry system; it should not be confused with every calculator that happens to have an equals key. The precise rules are in chapter 4.

For the preceding example, keep real mode and FIX 4. Select ALG; with no pending command or active shift, use its unshifted CLEAR. The full sequence

\[ \key {(}\ \key {2}\ \key {+}\ \key {3}\ \key {)}\ \key {\(\times \)}\ \key {(}\ \key {4}\ \key {+}\ \key {5}\ \key {)}\ \key {=} \]

also produces 45.0000. SpicyRPN additionally accepts adjacent parenthesized groups as multiplication, so the explicit \(\times \) can be omitted in this particular sequence.

Table B.1: Different kinds of context in the two entry modes

Question

RPN

ALG

What records the plan?

Your sequence of operations and the values waiting on the stack.

The expression, its parentheses, and the precedence rules.

   

What can I inspect?

Current intermediate values, including deeper values in the stack inspector.

The entered expression in real or complex mode, plus the current value or completed answer. Worksheets retain their labeled results.

   

How do I continue?

Use the result already in X, bringing in more operands as needed.

Continue from a completed result with an operator, or insert ANS into a new expression.

   

What must I remember?

Operand order, stack positions, and when a value must be preserved.

Grouping, precedence, and where a function’s argument begins and ends.

   

How do I correct work?

Edit the current number before operating; recover available operands or reconstruct an affected step afterward.

Edit the expression from its right edge. SpicyRPN does not provide arbitrary cursor placement within it.

   

What is retained?

The current stack and working state, rather than a browsable record of earlier calculations.

The current expression and answer state, rather than a browsable collection of earlier expressions.

The choice is not a choice between different mathematical laws. SpicyRPN uses the same underlying numerical operations for ordinary arithmetic in both modes. RPN does not acquire extra numerical accuracy merely by omitting parentheses, nor does ALG lose accuracy merely by using them. Working precision and the actual sequence of operations matter. Reordering an expression can change accumulated rounding even when the rearranged expression is mathematically equivalent; see chapter 5 and chapter C.

Financial calculations, statistics, and associative memories are available in both modes, with shared banks and formulas. RPN supplies operands from the stack and returns results there. ALG uses explicit computation and labeled worksheets, keeping multiple outputs available without a stack. For TVM, ALG financial keys always store the displayed operand, while CPT followed by a register solves for it; RPN follows the store-or-solve rules in chapter 11. These entry conventions, alongside the shared scientific functions, ordinary memories, and conversions, let you choose a working method without changing the underlying mathematics.

B.3   Counting keys fairly

RPN often saves grouping keys, but it may need ENTER to separate successive numbers. ALG may avoid parentheses by using precedence or implicit multiplication. Neither mode wins every key-count comparison.

Table B.2 counts the actual calculation keys in SpicyRPN: each digit, operator, parenthesis, ENTER, and = counts once. Mode selection and the initial clear are excluded in both modes. Each calculation starts independently with no pending command or active shift, real mode, FIX 4, and the default working precision; RPN uses a cleared default five-register stack, and ALG uses a cleared expression. No stored values, previous answer, or repeated-equals shortcut is assumed.

Expression

Result RPN keys ALG keys

\(2+3\)

\(5\) 4 4

\(2+3\times 4\), operands in written order

\(14\) 7 6

\((2+3)(4+5)\)

\(45\) 9 11
Table B.2: Small comparisons, including cases that do not favor RPN

For the first row, RPN uses 2 ENTER 3 +; ALG uses 2 + 3 =. The separator replaces the equals key, so the totals are equal.

For the second row, preserving the written order of the numbers gives the RPN sequence

\[ \key {2}\ \key {ENTER}\ \key {3}\ \key {ENTER}\ \key {4}\ \key {\(\times \)}\ \key {+}. \]

ALG uses 2 + 3 \(\times \) 4 =, letting multiplication precedence do the grouping. An RPN user can instead calculate the product first:

\[ \key {3}\ \key {ENTER}\ \key {4}\ \key {\(\times \)}\ \key {2}\ \key {+}. \]

That also takes six keys and gives 14.0000. It requires choosing a different order of entry, which is useful work to recognize when comparing speed.

For the last row, the RPN sequence is the worked example’s nine keys. ALG takes eleven using adjacent groups, or twelve using the explicit multiplication shown earlier. Counting unnecessary parentheses or an unnecessary multiplication would exaggerate RPN’s advantage.

A key count measures only one part of a task. Reading a formula, deciding on an order, checking a subtotal, locating a shifted function, and repairing a mistake all take time. The keys also differ in size and location on a touch screen. A shorter sequence can therefore take longer to execute confidently. Conversely, a few extra keys can be worthwhile if they make the calculation easier to check.

B.4   Learning effort and opportunities for error

The basic RPN rule is short: supply the operands, then the operation. Fluent use requires more than memorizing that sentence. You learn to see an expression as a set of small calculations and to recognize which intermediate values can safely wait. That effort is most visible at the beginning, when translating a familiar written formula into a new entry order still takes conscious thought.

Some errors become less likely because RPN does not ask you to enter parentheses or defer ordinary arithmetic according to precedence. Other errors become possible because stack position carries meaning. The most useful comparison is therefore between concrete failure modes:

Operand order.

Addition can hide a reversal because \(a+b=b+a\). Subtraction and division cannot. In RPN, an ordinary binary operation uses \(Y\mathbin {\mathrm {op}}X\). In ALG, the corresponding order appears left to right in the expression. When learning, include subtraction and division rather than practising only commutative operations.

Separating numbers.

In RPN, ENTER separates consecutive numeric entries. A function already ends the current entry, so another ENTER is usually unnecessary before the next number. In SpicyRPN, the first ENTER during entry commits that number; an idle ENTER duplicates X. Confusing the two changes the stack. Section 2.3 explains the distinction.

Keeping unfinished work.

A fixed stack can lose its deepest value when a new value is pushed onto a full set of useful registers. A larger or unlimited stack can remove that particular capacity constraint, but cannot identify the meaning of forgotten values. ALG instead asks you to keep track of open groups and the expression’s right edge.

Recovering after an operation.

RPN’s LAST X and LAST Y can recover operands in the circumstances described in section 2.9. They are not an undo history and do not restore every affected register or stack position. ALG editing can repair an expression before evaluation, but reaching an earlier mistake may require removing and re-entering later material.

Neither notation prevents a transposed digit, the wrong angle unit, a misread percentage, or a cash flow with the wrong sign. Those are errors in the input or interpretation, even when the calculator follows the entry perfectly. Checking dimensions and estimating the answer remain useful in either mode.

A reasonable learning goal is to make a short calculation understandable at every step. Start with two operands, then a running subtotal, then two independent subtotals. Only afterward work on reducing stack depth or saving individual key presses. The exercises in chapter A follow that progression. They also separate a correct, readable solution from an unusually compact one; the latter is not a prerequisite for using RPN well.

B.5   What the historical studies establish

RPN’s reputation is not based solely on personal preference. Researchers have compared calculator entry systems experimentally. Three early papers are relevant, although their results need to be kept within the conditions they studied. The descriptions here are limited to the authors’ published abstracts, rather than a new review of their full experimental data. The references and accessible records appear in section B.8.

Kasprzyk, Drury, and Bialas (1979) compared carefully matched calculators with users experienced in the respective entry systems. Their abstract reports results favoring RPN, while noting that the overall speed and accuracy differences were smaller than earlier findings. This supports an advantage in that comparison; it does not describe the entire learning curve of a person meeting RPN for the first time (source 1).

Agate and Drury (1980) reported faster calculation with the RPN calculator, particularly among participants with a technical background. Their abstract states that differences in the calculators’ own speed and in participants’ dexterity did not explain the measured difference. That is evidence about task performance, rather than simply faster arithmetic hardware (source 2).

Kreifeldt (1981) examined interrupted as well as uninterrupted work. His abstract reports no significant performance difference in the uninterrupted condition. Interruptions increased completion time for both groups, with a larger cost for ALG users. He also raises the possibility that users’ approaches to formulating problems matched the calculator logic they had selected. This is a useful qualification: the relationship between the person, task, and interface may matter as much as a ranking of notations (source 3).

These reports should not be converted into a universal percentage saving or a promise that every user makes fewer mistakes with RPN. Calculator layout, prior experience, the expressions selected, opportunities to inspect work, and the way errors are scored all affect what a comparison means. A comparison of particular handheld calculators from that period also does not establish the same result for a modern phone interface or an expression editor with different correction facilities.

For choosing a working method, separate three questions: how quickly you can enter familiar calculations, how readily you can detect and repair mistakes, and how much practice you are willing to invest. The studies give a reason to take RPN seriously. Your own tasks determine whether its way of organizing intermediate results is helpful to you.

B.6   From Polish notation to pocket calculators

The name refers to the placement of operators. In ordinary infix notation, subtraction appears between its operands, as in \(9-4\). In prefix, or Polish, notation the same operation is written \( {-}\;9\;4 \). In postfix, or reverse Polish, notation it is written \(9\;4\;{-}\). “Reverse” concerns where the operator appears; it does not reverse the digits or interchange the two operands.

For operators with a known number of arguments, prefix and postfix notation can express grouping without parentheses. For example, \((2+3)(4+5)\) becomes the postfix sequence

\[ 2\quad 3\quad +\quad 4\quad 5\quad +\quad \times . \]

The calculator’s ENTER keys separate typed numbers; they are part of the entry interface, rather than mathematical operators in that sequence. This distinction explains why calculators can share RPN notation while differing in their stack and entry rules.

The following are selected milestones, not a claim that a single machine or person accounts for the whole development.

The 1920s: Polish notation.

Jan Łukasiewicz developed prefix notation in mathematical logic. C. L. Hamblin’s 1962 paper credits Łukasiewicz and cites work from 1921 and 1929. The purpose of that notation was broader than calculator keyboard design: it represented the structure of logical expressions without ordinary bracketing.

The 1950s and early 1960s: stack-based computation.

Hamblin’s 1962 paper discusses reverse Polish notation as an order suitable for executing operations, refers to his 1957 addressless coding work, and connects the approach with the pushdown stores of the English Electric KDF9 and Burroughs B5000. The connection between postfix expressions and a stack therefore predates pocket scientific calculators (source 4).

1968: the HP 9100A.

Hewlett-Packard’s desktop scientific calculator used RPN. It is an example of the notation moving into a calculator that users operated directly, before HP’s pocket models (source 5).

1972: the HP-35.

HP introduced its handheld scientific calculator using RPN. Its contemporary Hewlett-Packard Journal explanation presents operands followed by operations and the stack as storage for intermediate results. It also describes evaluating an expression from its inner groups outward (source 5).

1981: the HP-12C.

HP introduced this programmable financial calculator with business functions including depreciation and date arithmetic (source 5).

The enduring idea is smaller than any particular keyboard: keep values available and apply an operation when its arguments are ready. Stack depth, duplication rules, memory facilities, and the display are separate design decisions. A user familiar with an older HP calculator should therefore learn SpicyRPN’s entry rules explicitly; see section 2.11.

B.7   Why SpicyRPN takes this form

The original SpicyRPN website gives a personal account of the project’s origin. Its author describes using an HP-15C from university onward and wanting an RPN calculator available on an iPhone. The site’s RPN primer also explains two deliberate choices: a fifth stack position for times when four felt restrictive, and revised entry behavior to avoid an unnecessary push when confirming a number before a unary operation. Those are documented motivations for the original design, rather than motives inferred from the present feature list (source 6).

The current application retains a five-register default but allows a fixed depth from 2 to 1000, or an unlimited stack. It lifts the stack once when numeric entry begins; ENTER during that entry commits without a second lift. A further ENTER duplicates the committed value. These rules make the distinction between finishing entry and requesting another copy explicit. They are SpicyRPN’s rules, not a claim of identical behavior across HP models.

Other current choices shape the same working experience:

  • The full-stack inspector makes waiting intermediate values available for inspection without changing them. Ordinary and associative memories provide longer-lived storage when stack position is the wrong way to organize a value.
  • Working precision is configurable, separately from the display. The default is 600 decimal digits of working precision, with supported settings from 16 to 10000. That is a numerical facility shared by the entry modes, not a consequence of RPN notation.
  • RPN and ALG retain independent unfinished work. Changing modes does not translate the stack into an expression or evaluate the expression into the stack. Shared memories provide an explicit way to transfer a result when needed.
  • The financial commands use dedicated registers and conventions, alongside the stack. Familiarity with RPN does not replace learning those conventions, including cash-flow signs, periodic interest rates, and the store-or-solve behavior described in chapter 11.

The capabilities and operating rules in this manual describe SpicyRPN Release 2.0.0, following the original application offered on the App Store around 2019. The historical account explains where the design began; the preceding chapters explain the calculator you are using.

B.8   Sources and further reading

The historical statements above use the following primary accounts. The three experimental summaries rely on author abstracts; no effect size, sample count, or modern-interface benchmark is inferred from them.

1.
D. M. Kasprzyk, C. G. Drury, and W. F. Bialas, “Human behaviour and performance in calculator use with Algebraic and Reverse Polish Notation,” Ergonomics 22(9), 1011–1019 (1979). DOI: 10.1080/00140137908924675. The SUNY research record reproduces the authors’ abstract.
2.
S. J. Agate and C. G. Drury, “Electronic calculators: which notation is the better?” Applied Ergonomics 11(1), 2–6 (1980). DOI: 10.1016/0003-6870(80)90114-3. The original abstract is available in PubMed, record 15676368.
3.
John G. Kreifeldt, “Hand Calculator Performance Under Interrupted Operation,” Proceedings of the Human Factors Society Annual Meeting 25(1), 329–332 (1981). DOI: 10.1177/107118138102500187. The publisher’s abstract distinguishes uninterrupted performance from the cost of interruption.
4.
C. L. Hamblin, “Translation to and from Polish Notation,” The Computer Journal 5(3), 210–213 (1962). DOI: 10.1093/comjnl/5.3.210. This contemporary paper explains both forms of notation, their translation, and their relation to stack-based execution; its references identify the earlier Łukasiewicz and Hamblin works.
5.
Hewlett-Packard’s Virtual Museum entries for the 9100A (1968), HP-35 (1972), and HP-12C (1981); and the original sidebar “Reverse Polish Notation,” Hewlett-Packard Journal, June 1972. These support the selected product milestones, rather than a claim that HP originated the underlying mathematical notation.
6.
The original SpicyRPN RPN Primer, especially its account of the author’s HP-15C and its explanation of SpicyRPN’s five-position stack and entry behavior. Current capabilities are documented from the source version covered by this manual; chapter D explains obtaining that source.