# Are RPN Calculators dead and buried? R U Happy or sad?

**URL:** <https://boards.straightdope.com/t/are-rpn-calculators-dead-and-buried-r-u-happy-or-sad/664138>\
**Category:** In My Humble Opinion\
**Created:** [July 21, 2013, 10:06pm UTC](https://boards.straightdope.com/t/are-rpn-calculators-dead-and-buried-r-u-happy-or-sad/664138 "2013-07-21T22:06:27Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![aceplace57](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/aceplace57/32/3500_2.png) [@aceplace57](https://boards.straightdope.com/u/aceplace57)\
**Post date:** [July 21, 2013, 10:06pm UTC](https://boards.straightdope.com/t/are-rpn-calculators-dead-and-buried-r-u-happy-or-sad/664138/1 "2013-07-21T22:06:27Z")

</div>

RPN - Reverse Polack was the bane of my college life. (actually it was Reverse Polish notation) and cost me a very rare C in Data Structures (a Computer Science class) and it hurt me in other classes too.

I never could grasp the demented logic of RPN notation.

Are RPN calculators truly dead and gone? Can we dance on their grave?

I know there were people that love RPN logic. Are they still buying RPN calculators?

---

<div class="post-metadata">

**Author:** ![Knorf](https://avatars.discourse-cdn.com/v4/letter/k/58956e/32.png) [@Knorf](https://boards.straightdope.com/u/Knorf)\
**Post date:** [July 21, 2013, 10:07pm UTC](https://boards.straightdope.com/t/are-rpn-calculators-dead-and-buried-r-u-happy-or-sad/664138/2 "2013-07-21T22:07:33Z")

</div>

I love RPN. I don’t have to buy a new calculator, because the HP 11C I purchased in 1987 still works great.

I have, however, installed RPN calculator apps on my phone and tablet computer.

ETA: a quick Google search reveals there are many current models of RPN calculators available.

---

<div class="post-metadata">

**Author:** ![hajario](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/hajario/32/171_2.png) [@hajario](https://boards.straightdope.com/u/hajario)\
**Post date:** [July 21, 2013, 10:10pm UTC](https://boards.straightdope.com/t/are-rpn-calculators-dead-and-buried-r-u-happy-or-sad/664138/3 "2013-07-21T22:10:19Z")

</div>

The only calculator that I have now is on my phone and it’s standard entry. When I was an engineering student, I preferred RPN. I found it to be more intuitive and faster once I got accustomed to it which didn’t take very long.

I just did a search and you can still buy them.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [July 21, 2013, 10:12pm UTC](https://boards.straightdope.com/t/are-rpn-calculators-dead-and-buried-r-u-happy-or-sad/664138/4 "2013-07-21T22:12:22Z")

</div>

> [@aceplace57](#):
>
> I never could grasp the demented logic of RPN notation.

It’s not demented; it’s just different from what you’re used to.

Actually, you’re probably quite used to Forward Polish Notation for most things; e.g., normally, you’d write functionName(input1, input2, input3, …) to apply a function to some inputs. Ignoring the unnecessary parentheses and commas, this is Polish notation.

Reverse Polish notation is just what you get if you write the function name after the inputs, rather than before them.

---

<div class="post-metadata">

**Author:** ![Broomstick](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/broomstick/32/246_2.png) [@Broomstick](https://boards.straightdope.com/u/Broomstick)\
**Post date:** [July 21, 2013, 10:15pm UTC](https://boards.straightdope.com/t/are-rpn-calculators-dead-and-buried-r-u-happy-or-sad/664138/5 "2013-07-21T22:15:03Z")

</div>

Why do they call it reverse Polish notation?

---

<div class="post-metadata">

**Author:** ![aceplace57](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/aceplace57/32/3500_2.png) [@aceplace57](https://boards.straightdope.com/u/aceplace57)\
**Post date:** [July 21, 2013, 10:16pm UTC](https://boards.straightdope.com/t/are-rpn-calculators-dead-and-buried-r-u-happy-or-sad/664138/6 "2013-07-21T22:16:53Z")

</div>

For the kiddies that missed out.

an example of RPN expressions  
[http://www.seas.gwu.edu/~csci133/fall04/rpn-fig3.jpg](http://www.seas.gwu.edu/~csci133/fall04/rpn-fig3.jpg)

The article. Makes no more sense to me today than it did in 1984. My poor, poor GPA really took a hit thanks to RPN. Several of my CS classes used it.  
[http://www.seas.gwu.edu/~csci133/fall04/133f04toRPN.html](http://www.seas.gwu.edu/~csci133/fall04/133f04toRPN.html)

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [July 21, 2013, 10:17pm UTC](https://boards.straightdope.com/t/are-rpn-calculators-dead-and-buried-r-u-happy-or-sad/664138/7 "2013-07-21T22:17:05Z")

</div>

> [@Broomstick](#):
>
> Why do they call it reverse Polish notation?

Because it’s the reverse of Polish notation [in Polish notation (which we’re all quite accustomed to in general, though we stick in superfluous parentheses and commas, and switch ad hoc to a different syntax for things like addition and multiplication), function names come before their arguments; in reverse Polish notation, function names come after their arguments].

Polish notation, in turn, is called that because it is attributed to the Polish logician Jan Łukasiewicz.

---

<div class="post-metadata">

**Author:** ![Knorf](https://avatars.discourse-cdn.com/v4/letter/k/58956e/32.png) [@Knorf](https://boards.straightdope.com/u/Knorf)\
**Post date:** [July 21, 2013, 10:19pm UTC](https://boards.straightdope.com/t/are-rpn-calculators-dead-and-buried-r-u-happy-or-sad/664138/8 "2013-07-21T22:19:59Z")

</div>

In fact, the venerable Hewlett-Packard RPN models [12C](http://www.shopping.hp.com/en_US/home-office/-/products/Accessories/Calculators/12C) and [15C](http://www.amazon.com/HP-NW250AA-15C-Scientific-Calculator/dp/B005EIG3MW) are still available.

---

<div class="post-metadata">

**Author:** ![aceplace57](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/aceplace57/32/3500_2.png) [@aceplace57](https://boards.straightdope.com/u/aceplace57)\
**Post date:** [July 21, 2013, 10:22pm UTC](https://boards.straightdope.com/t/are-rpn-calculators-dead-and-buried-r-u-happy-or-sad/664138/9 "2013-07-21T22:22:51Z")

</div>

I’m not surprised. Some people I knew in college loved RPN.

It was one of those concepts people grasped quickly or struggled with like I did.

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [July 21, 2013, 10:24pm UTC](https://boards.straightdope.com/t/are-rpn-calculators-dead-and-buried-r-u-happy-or-sad/664138/10 "2013-07-21T22:24:40Z")

</div>

Handheld calculators in general are dead. Phones now serve that purpose.

I use an HP48 emulator on my phone just about every day. So RPN isn’t quite dead yet, for me.

I also have a real HP48 GX that functions as well as it ever did, though it’s been a while since I used it.

RPN was one of those fantastic things that I grokked instantly: it perfectly fit my mental model of how a computation progresses. I borrowed a friend’s in high school, figured it out within an hour, and bought my own within the week.

---

<div class="post-metadata">

**Author:** ![leahcim](https://avatars.discourse-cdn.com/v4/letter/l/b4bc9f/32.png) [@leahcim](https://boards.straightdope.com/u/leahcim)\
**Post date:** [July 21, 2013, 10:31pm UTC](https://boards.straightdope.com/t/are-rpn-calculators-dead-and-buried-r-u-happy-or-sad/664138/11 "2013-07-21T22:31:19Z")

</div>

> [@aceplace57](#):
>
> Several of my CS classes used it.

You can see why – RPN expressions are the most easy for computers to implement. To parse a “normal human” expression, you need a bunch of rules about parentheses and precedence. To parse RPN, you just need a stack and two rules to parse from left to right:

[ol]  
[li]If you encounter a number, push it onto the stack.[/li][li]If you encounter an operation, pop two numbers off the stack, apply the operation, and push the result onto the stack.[/li][/ol]

Back in the day, computers weren’t as “meet the humans halfway” as they are now, so you ended up doing what was easiest for the computer.

---

<div class="post-metadata">

**Author:** ![aceplace57](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/aceplace57/32/3500_2.png) [@aceplace57](https://boards.straightdope.com/u/aceplace57)\
**Post date:** [July 21, 2013, 10:41pm UTC](https://boards.straightdope.com/t/are-rpn-calculators-dead-and-buried-r-u-happy-or-sad/664138/12 "2013-07-21T22:41:46Z")

</div>

I’m surprised scientific calculators are considered obsolete or dead. There’s so many specialized buttons on them.

I find it so cumbersome trying to use a mouse on a pc based calculator. They are fine for entering a simple equation. But I reach for my calculator when I have anything very long.

---

<div class="post-metadata">

**Author:** ![Happy\_Fun\_Ball](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/happy_fun_ball/32/17664_2.png) [@Happy\_Fun\_Ball](https://boards.straightdope.com/u/Happy_Fun_Ball)\
**Post date:** [July 21, 2013, 10:48pm UTC](https://boards.straightdope.com/t/are-rpn-calculators-dead-and-buried-r-u-happy-or-sad/664138/13 "2013-07-21T22:48:04Z")

</div>

I miss my 28s, that calculator seriously rocked. That said, the 48s emulator on my android phone is great and RPN is the way to go. I will say that if I am sitting in front of my computer I will just use MatLab.

---

<div class="post-metadata">

**Author:** ![friedo](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@friedo](https://boards.straightdope.com/u/friedo)\
**Post date:** [July 21, 2013, 10:48pm UTC](https://boards.straightdope.com/t/are-rpn-calculators-dead-and-buried-r-u-happy-or-sad/664138/14 "2013-07-21T22:48:44Z")

</div>

It’s just a stack. If you don’t get that then you probably deserved a C in data structures. 🙂

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [July 21, 2013, 10:49pm UTC](https://boards.straightdope.com/t/are-rpn-calculators-dead-and-buried-r-u-happy-or-sad/664138/15 "2013-07-21T22:49:27Z")

</div>

> [@aceplace57](#):
>
> I find it so cumbersome trying to use a mouse on a pc based calculator. They are fine for entering a simple equation. But I reach for my calculator when I have anything very long.

Like I said, I use an HP48 app on my phone. It is just as functional and as easy to use as the original. It’s even quite a bit faster. The only minor downside is the lack of tactile response on the buttons, but I’ve pretty much gotten used to that for other reasons.

For more serious math I use a real computer math program, like Octave. Sometimes Wolfram Alpha does reasonably. The paid version on Android is handy because it includes a specialized keyboard (with integral symbols, etc.).

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [July 21, 2013, 11:02pm UTC](https://boards.straightdope.com/t/are-rpn-calculators-dead-and-buried-r-u-happy-or-sad/664138/16 "2013-07-21T23:02:29Z")

</div>

To the OP and perhaps others, it may be useful to consider this:

Even humans essentially turn expressions into RPN when they go about evaluating them.

Consider the expression ((5 + 8) \* 9 + (53 + 19)/(4 \* 6))/8. Go ahead and calculate the result by hand. How did you go about doing so?

Well, you probably did something like this:  
First, you took 5 and 8, and added them, to get an intermediate result; let’s call it X.  
Then you took X and 9, and multiplied them, to get an intermediate result; let’s call it Y.  
Then you took 53 and 19, and added them, to get an intermediate result; let’s call it Z.  
Then you took 4 and 6, and multiplied them, to get an intermediate result; let’s call it A.  
Then you took Z and A, and divided, to get an intermediate result; let’s call it B.  
Then you took Y and B, and added them, to get an intermediate result; let’s call it C.  
Finally, you took C and 8 and divided, to end up with the final result for the overall expression.

Which is exactly the series of instructions the RPN translation of the expression amounts to [well, except for the cleverness in RPN of not bothering to name or explicitly refer to the intermediate results]. If you just read off every argument and operation above, except for the names of the intermediate results, you’ll get:

5, 8, add, 9, multiply, 53, 19, add, 4, 6, multiply, divide, add, 8, divide.

So RPN is what you’re doing already\*; you just might not be paying attention to it.

[\*: Unless you have a bunch of friends willing to help you work out different parts of an expression in parallel… Then serialization is a red herring, and there’s no substitute for the expression tree itself, in all its nonlinearly structured glory]

---

<div class="post-metadata">

**Author:** ![aceplace57](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/aceplace57/32/3500_2.png) [@aceplace57](https://boards.straightdope.com/u/aceplace57)\
**Post date:** [July 21, 2013, 11:09pm UTC](https://boards.straightdope.com/t/are-rpn-calculators-dead-and-buried-r-u-happy-or-sad/664138/17 "2013-07-21T23:09:19Z")

</div>

I couldn’t find a simple example on google. Just so the newbies can understand the topic.

Lets try this one 2((8 + 9/3) \* (40/8))

yeah, we can do it in our head. 110 But play along.

Someone care to show it in RPN?

---

<div class="post-metadata">

**Author:** ![allyn](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@allyn](https://boards.straightdope.com/u/allyn)\
**Post date:** [July 21, 2013, 11:20pm UTC](https://boards.straightdope.com/t/are-rpn-calculators-dead-and-buried-r-u-happy-or-sad/664138/18 "2013-07-21T23:20:54Z")

</div>

2  
\<enter\> ;push on stack  
8  
\<enter\> ;push on stack  
9  
\<enter\> ;push on stack  
3  
/ ;=3

- 

```
        ;=11

```

- 

```
        ;=22

```

40  
\<enter\> ;push on stack  
8  
/ ;=5

- 

```
         ;=110
```

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [July 21, 2013, 11:23pm UTC](https://boards.straightdope.com/t/are-rpn-calculators-dead-and-buried-r-u-happy-or-sad/664138/19 "2013-07-21T23:23:37Z")

</div>

**aceplace57** , suppose we wrote Add(x, y) instead of x + y, Mult(x, y) instead of x \* y, etc., in the same way that we talk about all the functions that we haven’t bothered to make up special symbols for.

Do you think you could write “2((8 + 9/3) \* (40/8))” in that syntax?

---

<div class="post-metadata">

**Author:** ![Giles](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/giles/32/60_2.png) [@Giles](https://boards.straightdope.com/u/Giles)\
**Post date:** [July 21, 2013, 11:25pm UTC](https://boards.straightdope.com/t/are-rpn-calculators-dead-and-buried-r-u-happy-or-sad/664138/20 "2013-07-21T23:25:31Z")

</div>

> [@aceplace57](#):
>
> Lets try this one 2((8 + 9/3) \* (40/8))

2, 8, 9, 3, divide, add, multiply, 40, 8, divide, multiply

[Next page](https://boards.straightdope.com/t/are-rpn-calculators-dead-and-buried-r-u-happy-or-sad/664138.md?page=2)
