Posted
by
timothy
on Thursday May 05, 2011 @04:46PM
from the if-you-have-one-raise-your-hand-at-the-end dept.

Hugh Pickens writes "The Wall Street Journal reports that Hewlett Packard's HP-12C financial calculator has remained outwardly unchanged since its introduction in 1981. 'Once you learned it on the 12C, there was no need to change,' says David Carter, chief investment officer of New York wealth-management firm Lenox Advisors, who has owned his 12C for 22 years and still keeps it on his desk. 'It's not like the math was changing.' The 12C, which costs $70 on HP's website, is HP's best-selling calculator of all time, though the company won't reveal how many units it has sold over the years. The 12C still uses an unconventional mathematical notation called 'Reverse Polish Notation,' which eschews parentheses and equal signs in an effort to run long calculations more efficiently."

I thought those RPN folks were crazy until I had to write my own stack-based RPN calculator for a school assignment. There is nothing more awesome than being able to compute a quadratic formula without using grouping symbols.

Problem: You're writing an expression evaluator on an early calculator engine with a really small stack, and/or you're too lazy to code an expression evaluator that understands order-of-operation conventions.

Solution: make the user do the recursive-descent grunt work.

Field goal: pitch this bit of engineering laziness as a feature, and watch people start a cult around it.

I used RPN in the first grade but we didn't call it that. I'd write down the first number, then write down the second number then add or subtract them. I have never understood why the vast throngs think RPN is unconventional. So called algebraic calculators are hybrid notation. If they were truly algebraic you would enter cos(n)= instead of n, cos which is postfix notation.

Yes, and this hybridized notation is responsible for the confusion around expressions like 6/2(1+2). Some people think the answer is 9, others say 1. If you bring to bear a fair amount of knowledge about precedence and associativity of the operators involved, you find the correct answer is 9.

It is clear that the operation in parenthesis occurs first so 6/2(1+2) becomes 6/2(3) or 6/2x3. The question then is do you multiply or divide first. The precedence I learned in school was multiply, divide, add, subtract (mnemonic "My Dear Aunt Sally") so that would be 6/6 or 1.
If you had proper typesetting (ala TeX) this wouldn't be ambiguous, but since it is inline you can't really tell. I would argue that in this case operator precedence rules prevail.

It is clear that the operation in parenthesis occurs first so 6/2(1+2) becomes 6/2(3) or 6/2x3. The question then is do you multiply or divide first. The precedence I learned in school was multiply, divide, add, subtract (mnemonic "My Dear Aunt Sally") so that would be 6/6 or 1.

I was always taught that multiplication and division were of equal precedence since they are equivalent operations algebraically. Dividing by 2 is the same as multiplying by half. Addition and subtraction also have equal precedence since adding -2 is the same as subtracting 2. I wasn't taught any mnemonic. (Mnemonics can be useful if correct but I'd call that one silly).

So if you want to be algebraically consistent, precedence isn't the real issue at all. The real issue is whether you calculate left to righ

It is clear that the operation in parenthesis occurs first so 6/2(1+2) becomes 6/2(3) or 6/2x3. The question then is do you multiply or divide first. The precedence I learned in school was multiply, divide, add, subtract (mnemonic "My Dear Aunt Sally") so that would be 6/6 or 1.

That mnemonic helps remember the order of operations, but is not absolute, as multiplication and division are on the same level of precedence. One does not come before the other and has nothing to do with which you perform first. Rather, you do the operation which appears first starting on the left side (division is left-associative).

Me too - except mine's a 41c. I used it to check a set of printed financial tables that we were publishing at the time, and to navigate a small boat across the Atlantic (pre GPS). It's still going strong after what must be at least 30 years. Sadly my HP-80 died. That must have gone back to about 1972.

I never had one. I never used TI either. I find both a bit painful to use myself. Instead I had (in high school/college) a Sharp EL-5100 "equation writer". Type in your equation, then press equal. If you make a mistake or typo you can edit it before pressing equal. Most other calculators require you to start over if the key you pressed 20 keys ago was wrong.

Of course, the HP-41 series that so many geeky young pre-engineers wanted were extremely expensive. Budget plays a big part in choosing a good sc

Long live the 48. My favorite is my 48gx, and my backup is a pale 35s. (Curse be to (s)he who designed the 'enter' key on the 35s.) It's a nice, small benefit to running a course somewhat different from most. My calculators use RPN, and my computers read the keyboards as dvorak by default. Those who know me cringe at the notion of borrowing a computer or calculator from me.

I really must agree with you about the learning curve. The first time that I used RPN, a light bulb came on (and immediately burne

As long as calculus isn't involved, a spreadsheet is best. I did an Astronomy masters (finished 2002) and significantly cut down my time doing assignments involving simple algebra by using a spreadsheet. It was a distance course. We also had open book exams, and were permitted to use any calculation tools we wished. The only rule for assignments and exams was no collaboration.

Advantages of a spreadsheet: Repeatable. You can see your work and modify or correct mistakes at will. Graphs are limited but easy. Both statistical and scientific functions. Time saved can be used to do simple checking (plugging the answer back into the question).

Reverse polish is good on old style calculators for exactly 2 reasons:1) You have the limited input and output of a calculator keyboard and screen.2) You more closely mirror what a turing machine/computer is doing, so if you're trying to understand one it's a good way to get closer to the architecture

Reason 1 disappears if you spend most of your time sitting in front of a relatively modern computer.Reason 2 has less to do with the calculation than it has to do with IT and computer science. And once you have a good understanding, you're just reinforcing that same knowledge.

Spreadsheets are excellent but have no native ability to solve or graph calculus equations. For that I would use a math package. Octave and SciLab can be had for free. Matlab, Maple, and Mathematica for more money if you're serious.

I can't disagree with you much, but for my work, I may need to perform field calculations that require an immediate guesstimate. For that, I can use an 8 oz calculator which turns on instantly, or a 5 lb laptop that takes 2 minutes to get to a spreadsheet. . ..And my employer refuses to supply a laptop.

I like to double-check myself with spreadsheets, and for fun, wrote a vba rpn calculator. I also build some rather extensive statistical models with spreadsheets with a level of detail that would take a y

Same here -- bought it for an undergraduate quantum mechanics class a quarter century ago, and used it today. And when it gives up the ghost (if ever), hopefully there will be an iPhone version, like there is for the 12c.

I never got used to RPN, but I do love the HPs; I have my trusty 20S in front of me now. I got it as a present when I went to college, and now, 23 years later I am still using it regularly, and it's only on its second set of batteries if you can believe that. I like it a lot because it is not overly complicated, it has more or less the same number of buttons as a regular scientific calculator of the era, except better precision... and a "backspace" button!

This is the scientific version of the same calculator, complete with RPN, a stack, plotting functions, matrix functions. I've had mine since 1991. It's a shame they tried to replace it with one that is crap.

I managed to program two parts of Bach's Fugue in C minor using the "[FREQ in Hz] [ DURATION in sec] BEEP" command and could, if I borrowed another student's 48, transfer part 2 via IR and run both mostly in sync through out the entire piece. Two devices beeping in lovely counterpoint oblivious to the unintended awesomeness they accomplished.

I've had mine since 93. Still works and I still used it as my main calculator up until a little over 18 months ago when I downloaded the m48 app for my iPhone. I use it with the iPhone calc skin, but it still gives me a mock up of the HP48 screen, still used RPN, and since I used basic math most of the time works wonders for quick calculations.

The best part is when I give it to friends and they try to add 1+1 by typing One, Plus, One and get an error instead of 1 enter, 1 enter, +

You would think given that calculators still sell pretty well and this one is doing good for 30 full years that HP would maybe consider that they made a mistake in essentially killing off this line. Wouldn't it be wonderful it HP put out hand device for engineers as far advanced a the HPs were then?

Spreadsheets have been getting worse computationally for almost 20 years. Algebra systems I haven't played with much since 2000 but they have definitely gotten better. And TI has finally brought an algebra system calculator combo out after all this time.

I may be biased but I think it makes more sense to put the functionality of various traditional handheld calculators into a single app. Perpenso Calc for iPhone [perpenso.com] optionally supports RPN and offers scientific, statistics, business, hex and bill functionality. More importantly you have the option to use a modern worksheet format for the time value of money, cash flow, amortization, break even, and profit margin calculations; or use the traditional button based approach if you prefer.

Just grab droid48 [android.com], an HP48 emulator. I was scouring ebay looking for a replacement for my trusty HP15C, until I found this and installed it on my phone. I still think the 15C looks cooler, but the 48 does everything I need.

Yay for the 42S. I never really grokked RPN before I got the 42S with it's two rows of output - 20yrs ago in my first year of engineering. Once I could see (and more easily track mentally) the two values the operator was going to work on and how they popped off the stack, it all instantly fell into place and made perfect sense.

They had awesome manuals too. I remember writing a program for figuring out 2nd moments of intertia and centroids of composite shapes where you entered a sequence of dimensions for th

Why do people cling to seriously outdated technology, that by today's standards is just a sorry joke of crappiness? Sure, back then it may have been awesome. But please, compare it to Qualculate! or even a full-blown suite like Mathematica on a small portable computer!

The problem is that like traditional handheld calculators, people do not always have their laptop/notebook with them. So applications like Perpenso Calc for iPhone [perpenso.com] are very useful because people will tend to always have their phone with them. With this single app you can make sure you always have the functionality of scientific, statistics, business and hex calculators with you.

As someone who posted up-thread about still using his 30 year old HP scientific calculator, and who also has Mathematica installed on his small portable computer (a 13 inch TimelineX), I can address this. Each tool has its own area of ideal application. I can crunch through some rapid calculations with my little calculator much more easily than I can boot my laptop. load Mathematica, and enter the same series of numbers and operations in it, even if I havemy laptop with me. Pressing the sin button on my HP is faster than typing Sin[ ] on a keyboard.

Your comparison is stupidly arrogant (if such a thing exists...) Let me draw it for you: a chainsaw to a common saw. They are built for different things. You don't need Mathematica when you just want to simulate scenarios for a down payment in front of the salesman in the dealership.

That would be moronic. It would show instantly that you don't grok the 12C. That you live up in the clouds. That you can't cook. That you don't get pussy. That you don't have real money. It means you're an instant goner.

the reason rpn gives the shortest way to write expressions is that there is a natural 1-1 mapping between a stack and a tree. and since people try to organize most knowledge into trees (until they run into insolvable groups), the most compact way of representing trees will win as a method of representing most operations.

Strange thing is these cost as much as they did when i bought mine 20 + years ago.. They should be cheaper now, so what is up with that?

If you figure $61 based on a google search [google.com], and calculate the inflation-adjusted price [westegg.com] then you see that it's only actually $35.71 in 1990 dollars. So they have become significantly cheaper.

Look at any business school class these days any you will not find very many HP-12Cs or TI BA-IIPlus calculators anywhere. Most serious number crunching is done on a spreadsheet so the only use for one is if you are in a meeting or need to do a very quick calculation when a computer isn't readily available. (happens now and then) The HP-12C is a fine piece of equipment but if you have a spreadsheet available it's kind of like using a slide rule. Sure it works but it probably isn't the best tool available most of the time.

I'm actually a certified accountant. I have one of the TI BA-IIPlus calculators and the only time I have used it in the last 8 years was to take a certification exam. (they only allow those two calculators in the test) Otherwise it sits in a drawer and gathers dust. Frankly I can't imagine I'm going to use it in the next 8 years either. For reasons I cannot fully grasp a lot of accountants still insist on using paper tape calculators to add up long strings of numbers even though they have a spreadsheet available on their computer. I can't begin to count the number of times I've seen accountants repeatedly type in long strings of numbers because of typos. Strange people who aren't willing to change with the times. I'm waiting for one to ask for the "4:30 autogyro to Siam [wikipedia.org] one of these days.

The HP-12C is superior to Excel when it comes to performing quick financial calculations. The RPN allows you to enter in formulas without worrying about matching parenthesis and formatting the cells, while it contains all the essential formulas you need with none of the bloat.

You can't hack numbers together as fast and efficient with any other calculator or computer program out there, which is why the HP-12C is still popular after all these years.

It may have been designed for financial calculations, but it holds its own for science and engineering tasks, too. A lot of problems in a lot of fields lend themselves very naturally to RPN workflows.

I learned to use these from my dad - he still has his, and I'm not sure there is any so-called feature that could ever make him give it up. Even when I was required to have a TI graphing calculator for classes, I found myself using it in RPN-style due to having learned to use the old HP (the last result is st

I don't understand how engineers could still use calculators today, except maybe out in the field where laptops are completely unpractical. I entirely stopped using calculators 15 years ago or so. I also never understood how supposedly tech-savvy people use calculator programs for PCs (like calc.exe or more "advanced" equivalents -- a totally superfluous software category IMHO). These days you can just fire up Python or Ruby (or, if you really must, Mathematica) and perform all kinds of interactive calculat

Because sometimes you just want to pull out a simple tool, punch in a few numbers, and get an answer instead of waiting for an application to load, remembering the exact syntax the app wants, and THEN getting around to the actual inputting of the numbers.

I wasn't talking about Python/Ruby scripts particularly, but about the interactive mode of those interpreters. I doubt that any pocket calculator is faster than that. Putting your calculations into a script would already be the next level, i.e. beyond the most basic, direct usage.

I've never met an app that felt as natural for handling pure computational tasks, and I have never needed to place a call from my calculator. Sometimes, purpose-built hardware is just better.

It's called a spreadsheet. Repeatable. Entered formulae can be reviewed for errors or modified at will. Graphs are limited but good for what they do. Sorry no calculus, imaginary numbers, matrix algebra or other specialised or advanced math. Now I won't deny that spreadsheet use from a phone sucks, but I'm surprised so many people still cling to their old gadgets when there are infinitely better solutions.

She gutted HP calculator R&D. The HP49G was the last new calculator they designed, I believe, and that was approximately 10 years ago.
I still have my trusty, old HP48GX. I don't have a chance to use it much these days, but it is resting at a place of honor in my home office.
HP made excellent calculators over the decades and it is a shame that a short-sighted CEO ended that legacy.

There was some design work done on the 49G, but IIRC, it was mostly cosmetic (although the layout did allow them to increase the total number of keys while appearing less cluttered than the 48). Under the hood, it was basically the same as the 48, except instead of an expansion slot and IR port, it had an extra 1.5 MB of flash memory hardwired in. The main improvement was software, and that was mostly cribbed (presumably with permission and/or help) form andre schorlrl's HP48 programming/hacking forum, wh

Everyone said it. She gutted HP. HP was an engineering company when she got there that made great devices in many areas. I can understand going where the money was, but I wish they had sold off the engineering divisions to someone who was interested in those more niche markets.

My 41CV died a couple of years ago, and I packed in the hell box. Display bled out and was unreadable, and I didn;t bother to get it repaired.

And I have a bunch of modules for it, financials mostly. And the wand, card reader/writer, blank overlays by the pound, stacks of solution books. I worked for a dealer... I also had a 67, but traded it in for th 41CV. And I had use of a 97 in between, but I never got very good at using it.

But - using the 41CV for balancing my checkbook was a blast. Organize it cor

Thankfully, those of us who use emacs just run M-x calc to get back to an RPN calculator which actually calculates numbers. (It's pretty much the main reason why my 48gx sits on my shelf waiting to be used.)

RPN is great. Once you get used to it, you never look back. BTW, RPN is what the Forth programming language uses.

When doing financial calculations or shopping I always take it with me. Also to the bank. It creates an instant bonding between you and the manager (those initiated in HP 12C's RPN).

HP calculators, IIRC, were used to calculate the orbits in some early space program missions (YouTube). I think it's safe to say that the 12C is more numerically trustworthy than some Pentiums that came out....

The "C" suffix stood for "continuous memory", meaning that programs and data did not disappear when the calculator was shut off. Like what every calculator does today. Before then, however...

My first HP was the HP-25, a glorious invention when it came out in 1975. It had 49 programming steps, and the program had to be re-entered from the keyboard, line-by-line, every time the calculator was turned off. My first real programming success came when a high school math teacher, trying to show how hard it was to determine whether a given number was prime or composite, asked my class to determine whether the number 300,000,007 was prime or not. (Thirty-five years later, I have not forgotten that number, and don't think I ever will.)

I was able to program a test for primality into the HP-25. It was brute-force, of course -- checked for an integer result when the argument was divided by two, and then every odd number from three up to the square root of the argument -- but it worked, and I was able to show that 300,000,007 was prime. The teacher was impressed, both with the calculator and with the fact that such a large number that she picked out of the air at random turned out to be prime. (I don't think she new or cared about programming.)

I love that calculator. The HP-25C came out the following year, and the HP-25 became an orphan, but I still have it -- along with an HP-48G+ purchased about 12 years ago. (Finding a new calculator with RPN turned out to be harder than I thought.)

I always thought RPN was a ridiculously complicated way to evaluate expressions. Looking back after having seen the light, I don't see how I would have made it through two engineering degrees without it.

I first learned RPN in the seventies on my first calculator, an HP 45. When it was stolen in the eighties, I got an HP 16c which I still have and which still works flawlessly. At work I mostly use RealCalc on Android with radix and rpn modes turned on, but I also keep a 48C in reach. I *can* operate a regular calculator, but RPN makes so much more sense to me.

My daughter took to RPN easily at 13 years old, but it confused her teachers so she had to go back to conventional notation.

So, when you write a program, do you use forth, or do you recompile the expressions into a parenthesized tree form in your head before you type them in?

I don't use a calculator to write programs - I use them to solve problems. I think about the terms in a problem exactly the way RPN handles them - do you think up parenthesis in your head when you are mentally calculating something?

On the HP48, this would put a symbolic equation on the stack (and it'd be formatted mostly as you expect...) you'd then enter another x and drill down through a few menus to reach the [solve] button, which would take the two items on the stack (an equation, and the character, "x") and solve the equation for the "x", if it could. It had a number of symbolic manipulations available to it, and I think there might even have been a numeric sol

Where RPN though would kick ass is '2+x-4=3*x' [STEQ] [shift x]would activate a solve for x function. You can see the whole equation just becomes a single argument in the RPN calculator which is jumping up a level of abstraction.