Why RPN, an anecdote.



#11

I thought I should share this anecdote I found while scanning a slashdot discussion about a possible TI-84 colour screen version:


Quote:
I don't know that I can really articulate it, either, but I can report the results of an interesting experiment I participated in about 20 years ago.

I was an RPN-lover even then, having recently graduated from my 15C to a 28S, but most of the other geeks in the university computer lab where I spent a ridiculous amount of time couldn't see the sense in it. Late one night the discussion got somewhat heated and someone said that an advantage of RPN was that it was faster because it required fewer keystrokes. A measurable claim like that immediately sparked a demand for proof, so we decided to do some comparisons.

One guy got on the whiteboard and wrote down four very complex arithmetic expressions. Then for each expression, two candidates were selected, one from the RPN camp and one from the infix camp. Each was to write down on the board, under the expression, the series of keystrokes that would be needed to evaluate it. In all cases the RPN keystroke list was shorter, often considerably, but after the first was done everyone noticed a second interesting and unexpected outcome: The RPN-wielder finished writing down his keystroke list long before the infix-wielder -- and not just because of the number of keystrokes. Everyone watching noticed that the infix-proponent often paused for a second or two to think about how to handle the next bit, or stopped for a moment to go back to count up parentheses. In contrast, the RPN-er never paused, never hesitated, just wrote down keystrokes as fast as he could.

After that, we all decided that we should also time the remaining trials, which were all conducted with different candidates. The RPN user consistently finished 25% faster than the infix user, even though the keystroke list was only about 5% shorter.

Then someone (I think it was actually someone from the RPN camp) decided to write a truly horrendously complex expression. It had fractions nested at least ten layers deep and was, frankly, ridiculous. Two more stepped up to try and, once again, the RPN user wrote down keystrokes in a long list, without any more hesitation than it took to find his place in the expression. The infix guy, on the other hand got badly bogged down, backed up several times and ultimately gave up after his RPN competitor had been watching him struggle for five minutes.

To top it all off, actually punching all those keystrokes into real calculators showed that RPN was more accurate. On only one of the five problems was the RPN calculation not correct, while the infix calculation was incorrect on three out of five (determining which answers were correct took significant time and much arguing).

Bottom line, per our impromptu tests and my personal experience, RPN is faster and easier.

I could easily explain why it requires fewer keystrokes, but why exactly it requires less cognitive effort is harder to describe. I believe, though, that it's because when you use RPN you pick a "path" through the expression, and then just follow it. At each point along the path you only have to remember where you've been and where you're going. The calculator keeps track of the stack. With infix you have to manage the "stack" in your head, figuring out when to add and remove nesting levels with parentheses. That's not exactly right, but it's as close as I've been able to come.

–— swillden @ Why do you, Slashdot users, like RPN?


Any of you guys remember similarly challenging infix friends?


#12

Yes, as a matter of fact. I was enamored with HP's in high-school, but used the far cheaper TI's all through college. So in the college discussions of RPN vs. algebraic, I was actually on the "wrong" side of the argument. I thought that since the algebraic followed the textbook print-out more closely, it must be more straight-forward to use algebraic to enter a problem. I had not thought through the problem far enough to realize I was having to do an additional layer of translation/memorization to work the problem with my TI. Problem is, you have to actually start working problems with an RPN calculator before you really understand the difference. It wasn't until I actually bought and used a 35S in RPN mode that I had my epiphany. You can guess the rest of my history from there :o)


Edited: 10 Dec 2012, 1:27 p.m.

#13

Quote:
One guy got on the whiteboard and wrote down four very complex arithmetic expressions.
and if it weren't for that part, RPN would have an even greater advantage. My 41cx contains programs I wrote for the things I do frequently; but the majority of calculations I need to do come up without warning, and there is no equation in front of me. This is real life. Thinking about the problem, I figure out the steps as I go, whether it's to take A, raise it to the power of B, subtract C, divide the whole thing by D, add E... whatever-- you get the idea.
#14

A lot of that is, or was, true.
Nowadays the algebraic calculators have become much better. All you need to do is type in the expression as you find it in the textbook - and check on the display you are not making any mistakes.

The main reason I always had trouble using algebraics is, that I was never sure what they actually did. For example: What do you get when typing 3 + 5 * 8 =? Is it (3+5)*8 = 64, or is it 3+(5*8) = 43?!?
Once again, this has changed and you now can be sure to get 43 from a modern algebraic calculator.

So now RPN is just what I am used to. And that is worth a lot. I can concentrate on the problem I want to solve, rather than the tool I use to do that.


#15

The problem with algebraic calc is that you have to deal with unexpected operators priorities for unsual ones.

take an HP39GII and type 8 MOD 3 + 1, you could be surprised by the result.

On a simple formula, you can have clue of a wrong result, but on a complex one, the formula is monolithic and you are reduced to pray that there is nothing wrong.

Patrice

Edited: 10 Dec 2012, 11:27 p.m.


#16

All:

While retired from the design business now, for many years I used Smoley's Tables for trig calculations. Now and then I would borrow a calculator, TI's were most commonly encountered, but I never was comfortable with their keyboard setup.

In the early '90's, I was on a temporary assignment in Cambridge, Mass, where one day I borrowed a calculator from a fellow worker, it happened to be one of the old, no longer made HP 11c's.

Needless to say, I found it to be truly amazing. I ordered one that day, they had been obsoleted, but some were still available, unsold stock. I still have it, nowadays using it for celestial navigation calculations, sight reduction. To bad HP gave it up, that is to say, they quit making the 11C, for it was literally a "shirt pocket calculator"..


#17

Hi Al,

Glad you enjoy your HP-11C. It's one of the best built calculators for sure and should serve you well for many years to come. If, however, it breaks for any reason whatsoever, you may appreciate there is a replacement available: the WP 34S. I don't know you are aware of it - you'll find a lot about it in earlier posts on this site. Just in case ...

d:-)


#18

The 11C (or in my case 15C) is still better in terms of shirt-pocketability ;-)


#19

Admitted :-) That's the fate of hobbyists relying on the hardware of another one: some 20mm longer, but some 5mm narrower, identical thickness. It's a replacement, not a clone.

d:-)

#20

If youse guys like the 11c - 15c models and lament their passing (as do I) then check THIS out! http://www.swissmicros.com/
They are in production and available now! My personal favorite however is the 42s; Still carry it (in my shirt pocket)and use it several times daily.


#21

Yes, those are nice. I just received the silver edition one. The keyboard is slightly improved over the second batch again (never had one from the first batch, so I can't compare it with that). But typing fast is still difficult.
The titanium housing is nice, but the aluminium one was OK, too. The new slim font is an improvement over the old font, and I really like the flip open pouch.

They are nice toys and I don't regret buying them (I have one from the second batch and one silver edition one), but they are not a replacement for the 15C as an every day calculator.
The WP34S is however, and I am hoping there will be an even better 43S soon :)

Edit:
I also bought 15CLEs. They do have a few bugs, but in my opinion nothing serious for every day use. And since they are full size calculators, they are much easier to use.


Edited: 12 Dec 2012, 11:37 a.m.


#22

Well, well, everything turns mini and micro - just our fingers don't ;-)

#23

walter b:

Re this WP 34s, saw a couple of posts on it, alas nothing that indicated a maker or prices. Could you clarify? Thanks.


#24

Al, please download this document (8.3MB) here: http://sourceforge.net/p/wp34s/code/3333/tree/doc/Manual_wp_34s_3_1.pdf?format=raw. Then read p. 1 and the bottom half of p. 2 and you'll know about it. Feel free to read more and you'll know more :-)

Hope this will explain it sufficiently. Else, please continue asking.

d:-)

#25

Quote:
... RPN is faster and easier.

In my opinion, the main reason why RPN is easier is that you enter the expression in a "natural" way, i.e., in the way that you would compute the expression manually, without the help of a calculator. You don't have to add virtual parenthesis which might cause cognitive overload with complex expressions.

Another advantage of RPN is that you see intermediate results which give you some confidence during calculations, and sometimes, the intermediate results can be reused. The stack also provides quite some room for optimizations when creating programs.

#26

I grew up with slide rules first, then the first pocket calculators came out (Sinclair, HP). We weren't allowed to use them during exams anyway, but we could use slide rules! From 1977, I used a TI (58) all through college then saw the light and went RPN, and to this day struggle with anything algebraic (WriteView etc. etc.) Mentally I break down the problem into workable chunks and then piece it all together, just like an RPN stack.

It would be worth hearing from some educators. Most schools are TI/Casio-oriented, but do these machines actually help students to think and do mental arithmetic, which is what the old slide rule gang had to do? Or does RPN actually TRAIN mathematical thinking and problem solving better? Here's a vote for the RPN.

#27

Hi,

For an alternate point of view about the merits of advanced algebraic versus RPN expression evaluation you might find this article interesting, in particular the Heresy ! section beginning at page 3 (PDF document):

Best regards.
V.


#28

so...te question is:

if it is really easier RPN for our brains, why CASIO, TI , SHARP, and other do not use it?

regards


#29

Quote:
so...te question is:

if it is really easier RPN for our brains, why CASIO, TI , SHARP, and other do not use it?

regards


Because algebraic LOOKS simpler. Telling a student: "Just type it in as you find it in the textbook" is easier than explaining how RPN works. Especially those students, who aren't too keen on the subject anyway, will stop listening half way through the explanation. And who cares about those who might be interested ;)

I have to agree that from an educational point of view RPN would be preferable.
Far to many students just want to have a quick way to find the "solution" to a problem. But it is much more important to "understand" the problem. Once you fully understand a problem, the solution is just another small step. If you try and solve a problem without understanding it, by applying "rules" you have "learned", getting the answer to your problem is very tedious.
Well, ok, maybe this doesn't apply to all problems, but certainly to a lot of those presented to students at school.

#30

Quote:
if it is really easier RPN for our brains [...]
It is only if you care about what you're doing, which might not be the case for the average pupil.

#31

Quote:
It is only if you care about what you're doing, which might not be the case for the average pupil.

I'd extend that statement ;-)

#32

Quote:

I'd extend that statement ;-)


I presume "pupil" is the part of the statement you would like to extend on. :)
#33

Hi Valentin; I would like to read the document referenced, and have tried several times at different hours. I keep getting a server timeout error. Is it possible you could e-mail me a copy? Thanx!
polarbear_mike @ yahoo.com


#34

Thanks to the Wayback Machine this document is available HERE.


#35

Quote:
Thanks to the Wayback Machine this document is available HERE.

Thanks a lot, Didier, I guess this solves Mike's download problem.

Best regards.
V.

.

Possibly Related Threads…
Thread Author Replies Views Last Post
  [PRIME] RPN: another attempt at returning more than one value to the RPN stack Marcus von Cube, Germany 5 2,549 11-05-2013, 02:44 AM
Last Post: Marcus von Cube, Germany
  New Iphone & Itouch calculator - Access RPN and Active RPN Nigel Bamber 1 1,217 06-10-2009, 04:13 PM
Last Post: Jean-Michel
  Another calculator with RPN (Corvus 500 RPN) Saile (Brazil) 7 2,279 03-31-2009, 12:14 AM
Last Post: Michael de Estrada
  A Recent HP Handheld Anecdote John Kercheval 0 666 04-11-2002, 04:50 PM
Last Post: John Kercheval

Forum Jump: