While Texas Instruments maintains dominance in the calculator market (especially graphing calculators), there was a time when this wasn’t the case. HP famously built the first portable scientific calculator, the HP-35, although its reverse-Polish notation (RPN) might be a bit of a head-scratcher to those of us who came up in the TI world of the last three or four decades. Part of the reason TI is so dominant now is because they were the first to popularize infix notation, making the math on the calculator look much more like the math written on the page, especially when compared to the RPN used by HP calculators. But if you want to step into a time machine and see what that world was like without having to find a working HP-35, take a look at [Jeroen]’s DIY RPN calculator.
Since the calculator is going to be RPN-based, it needs to have a classic feel. For that, mechanical keyboard keys are used for the calculator buttons with a custom case to hold it all together. It uses two rows of seven-segment displays to show the current operation and the results. Programming the Arduino Nano to work as an RPN calculator involved a few tricks, though. [Jeroen] wanted a backspace button, but this disrupts the way that the Arduino handles the input and shows it on the display but it turns out there’s an Arudino library which solves some of these common problems with RPN builds like this.
One of the main reasons that RPN exists at all is that it is much easier for the processor in the calculator to understand the operations, even if it makes it a little bit harder for the human. This is because early calculators made much more overt use of a stack for performing operations in a similar way to Assembly language. Rather than learning Assembly, an RPN build like this can be a great introduction to this concept. If you want to get into the weeds of Assembly programming this is a great place to go to get started.
I’ve used an HP48GX for very long, and i still have the very good android emulator installed. RPN is not dead.
I remember the 48GX, and 28S. Have, and still use the HP50G daily…RPN mode of course.
Which infix notation is that? The one where 1+23=7, or 1+23=9, or where sin(1+2) has to be entered as 1+2=sin?
RPN is concise, explicit, flexible, and has a pleasing workflow: gather everything you need together, and only then operate on it.
Just like your brain. You can’t do anything without a stack. What is 5 plus?
It’s possibly just 5, if it’s basic calculator infix – the plus hasn’t happened yet, it’s just telling you what operation is next. 5 plus is then equivalent to 5 minus times minus plus, because the first three just change the operation you are about to perform.
What’s 545+? In rpn calculator land, it could be 59, it could be 50, it could be 545 plus the output from the previous line, it could be 545 alone, or it could be an error. After all, I failed to specify where the separator was in that string, or what the starting contents of the stack were, or how the calculator resolves such things. Infix uses the operator as a separator, letting you express both pieces of information in one keypress, and then the equals button lets it know not to expect any more operands and just show the output.
Really though, parentheses are what you want past a certain point. Even if the order of operations would technically be right, just make it clearer and use them sometimes, whether on paper or not. Also lets you get the other functions right – a sine is a sin( and you close the parenthetical where you like and continue on happily. Sine being reverse of arithmetic can get silly.
Was that meant to say 1+2=7, 1+2=9 ? Having a hard time imagining any way to interpret 1+23= generating anything but 24. But of course there’s a lot of weird stuff out there, so if indeed it was meant as posted, what diabolical devices did that ?
Ahhh crumbs. Maybe the HaD treatment of the asterisk bit us both!
Had tried to say “1+2x=” but put asterisk where the ‘x’ is. Well .. that backfired.
. Not quite sure what happened there! Meant to write:
“The one where 1+23=7, or 1+23=9, or where sin(1+2) has to be entered as 1+2=sin?”
If you want diabolical, look at the Sumlock Anita 811. Unusable, unless your job title is “computer”. See
https://teanonymous.com/f1/viewtopic.php?p=8840#p8840
Sigh. Not quite sure what happened there, nor what the “HaD treatment of the asterisk bit us both” might be. Avoiding asterisks and using x to mean multiplication, I meant to write:
“The one where 1+2×3=7, or 1+2×3=9, or where sin(1+2) has to be entered as 1+2=sin?”
Hackaday supports (a few) asciidoc like features. I did an experiment and managed to get both bold and cursive text by using asterixes.
Literal text by enclosing in 3 backticks:
The other example was in:
https://hackaday.com/2024/09/11/using-a-potato-as-photographic-recording-surface/
Wonderful. Yet another scrotty little poorly defined markup language. Just what the world needs.
Try RealCalc (by Quartic Software) for Android, it’s an excellent RPN for daily use
The comment I was looking for.
I’ve used RealCalc for years. It’s great! RPN let’s you solve problems with the calculator the same way you’d solve them on paper or in your head. When you think about what you DO, and not how it’s written, RPN calculators are far more natural to use than algebraic notation ones.
I still use my HP 11C.
I remember how others back in the days had to mess around with brackets and/or long divisions. I simply used the 4 register stack :-)
The 48GX is somewhere in a drawer ;-)
But to be honest, when doing math with my children I now use a Casio – also because it is the calculator allowed in school.
Same!
I vaguely remember RPN feeling weird back as a high school freshman when I first encountered it. But it’s not exactly difficult.
For anything but a simple two numbers make one answer problem that I could have done in my head I think non-RPN calculators are so clumsy to use!
Ditto, except for using a 48SX back in 1990. Still have it and would never give it up. Use an android equivalent now. Great calculator.
I still have my HP-15C, HP-16C in my office. I started in college with the HP-11C. At home we still use the HP-12C for general use calculator. My dad used an HP-35, my uncle a HP-41. Forgot what my cousins used in college…
On my home Linux computers, for a calculator, I have an HP-15C emulator for quick calcs. Don’t know why RPN lost out as it so much more intuitive to calculate in standard RPN and everyone in CS, Chem, and Engineering was using them (in college) and when I went to work most engineers and computer people were using them.
RPN, IMHO, lost out, because TI scientific calculators beat HP to the college market by a year and a couple hundred dollars. The HP-35 (I knew someone who had one, we were all jealous) was far too expensive for a student. By the time you could finally get a HP-25, the TI calculators were ubiquitous and about $150 less expensive (but the keypads wore out and felt cheap).
I got my HP-25 in 1976 and still have it, though now I run a V41 emulator on my PC. RPN is very logical and works the way you evaluate math expressions anyway. Never did get into the TI way of doing things, but my wife claims it’s natural for her (and it’s what she taught in her middle school math classes)
Use my 15C emulator almost everyday. I still find RPN easier for everyday calculations
For quick calculations, that’s what I use. For more complex calculations, I use a spreadsheet or a decent language.
Never did see the advantage of programmable calculators, and I used one of the earliest in the early 70s: http://www.vintagecalculators.com/html/compucorp_320_series.html
I have a 42S which I bought in 1987, to replace the 11 that sadly grew legs when I left it unattended in the lab at school for 10 minutes. That 42S has the best keyboard layout of any HP I’ve ever used. Love that e^x and ln_x are both single press. It supports hexadecimal and the only program I ever keep in it allows me to flip back and forth from decimal to hex with one press of R/S. It goes 10 years on a set of batteries.
Someone gave me an HP48 simply because they didn’t like RPN and knew I did. Too much emphasis on programmability, that one. Would happily trade it for an 11, 15 or 42. If I need anything programmed, well, that’s a job for a computer.
Also bought one of those 35S models they came out with a while back. That was a near miss of a device. The silly 4-key directional rose is a waste of space. Theta and ‘8’ are nigh indistinguishable on the display. Worst is it’s just laggy enough that if, say, you peck in 123456789 in an even somewhat hasty way, it’s guaranteed to miss one of the digits, despite the otherwise pleasing tactile click of the key. And it sucks a pair of 2032 cells flat in 3 months.
But to the point, my 42S goes to work with me almost every day.
After the obvious ones, I’ve found the most useful keys on a RPN calculator are X<>Y and 1/x. They enable quick operations that would be clumsy or involve temporary storage in a memory on a muggle calculator.
Now I think I just found a use for those 14-segment displays… A hardware 41C emulator.
Anyone know of an open-source 41C emulator? Not a wheel I want to reinvent.
Just doing a quick search I find (not an endorsement as never used. YMMV):
https://hp.giesselink.com/v41.htm
https://sourceforge.net/projects/hp41cx/
cool. thanks.
+1 for V41, it’s what I use
You can still buy HP style calculators from Swiss Micros
https://www.swissmicros.com/products
I thought “not a bad price” until I realised I was lookIng at the price for a manual not the actual calculator!
Real deals weren’t cheap, back in the day.
“RealCalc” – a scientific calculator app for Android can be set for RPN operation, which is fun to confuse the uninitiated with (“Where’s the equals key on this thing?”).
My memory of this is that RPN was conceived by Jan Łukasiewicz as a means of making computation more efficient (fewer keystrokes/parentheses with calculators if I recall my HP-15 manual correctly) and it tucks nicely in with some stack operations.
Infix calculators aren’t easier for the human. They’re a giant pain in the butt to use once you’ve invested the 5 or 10 minutes it takes to internalize how the stack works.
And TI was not “the first to popularize infix notation”. Old four-function calculators were universally infix.
No, they were not universally infix.
See the Sumlock Anita 811 https://teanonymous.com/f1/viewtopic.php?p=8840#p8840 and weep.
I clicked on your link and got:
The board requires you to be registered and logged in to view this forum.
Rats. Here’s the relevant bits, but since I don’t understand hacker’s scrotty little markdowns language, you’ll have to guess where the asterisks are.
For some operations, such as addition, it is RPN, so 3+4 is entered as “C 3 + 4 +”, where “C is clear”. Yup, the “+” key has a dual function.
For other operations, such as multiplication, it is algebraic, so 3*4 is entered as “C 3 * 4 =”.
No, I can’t see how to calculate -3 * -4 = 12!
Then you get to “chain calculations”, where extra keys have to be used.
(17*9)+5 is entered as “C 17 * 9 = + 5 +”
There’s that dual function, again.
The memory is similarly weird, albeit interesting: it is an accumulating memory.
To calculate 34+56 you enter “C CM 3 * 4 = 5 * 6 = RM”, where CM and RM are clear/recall memory. Essentially the “=” also causes the result to be added to memory; no “+” is necessary.
The “%=” key is also quite nice, even if it is unnecessary.
What is “25% of 125” is calculated “C 125 * 25 %=” i.e. 31.25.
“If 21 is 25%, what is 100%” is calculated “C 21 / 25 %=” i.e. 84.
Thanks for the response!
It does sound frustrating!
RPN is also easier on the user. It doesn’t have complicated operator precedence rules that you must remember or else get the wrong results.
I am convinced that this is why most (99%) of the scores in my undergrad engineering thermodynamics course were so awful, but mine weren’t. I can’t prove that the other two students with good scores used HP calculators, but given the price differential in 1980, that ratio seems about right.
It doesn’t have complicated operator precedence rules that you must remember or else get the wrong results.
Hmm… interesting… we’ve learned these rules at school didn’t we. Even before calculators were common. So when processing calculations or formulas we need to honor them otherwise different people (or calculators) will produce different results, eventually resulting in world wide chaos, global misunderstanding. People start to think that if we can’t calculate then how would it be possible that almost 60 years ago things landed on the moon. And people might even think that if we can’t calculate, well then the world might be flat for all we know. People will go crazy, stop thinking all together and come up will all sorts of crazy stuff, some might even think the world is run by lizard people or that we live in a simulation.
Fortunately… most of us do use the complicated operator precedence rules properly, so the world is still a nice place [sarcasm may be applied here], lets keep it that way.
There are variations in operator precedence. Are multiplication and division the same or different?
Checking an old TI manual, they are the same.
Your calculator may vary.
Had one of the first HP RPN calculators in the mid-70s. Other students would want to borrow it in class so I’d hand it to them. That was followed by them handing back to me after a few moments asking where the ‘Equals’ key was.
The equals key is all in your mind, friend – this is not the calculator you’re looking for!
Still have a working HP67 my wife gifted me while I was in EE studies… I have lost track of the number of NiCd battery pack rebuilds.
It been a few years but I did 2 RPN coding for uC devices: one for the CC2533 in “C” and one for the ATmega128 – both on Smart Response surplus hardware.
https://hackaday.io/project/191722-rpn-integer-calculator-from-smart-response-pe
https://hackaday.io/project/192472-tweaking-basic-on-smartresponse-xe
I did not put a lot of effort in these weekend projects, so anyone pulling down the code has plenty of opportunity to enhance.
Correction:
https://hackaday.io/project/193043-rpn-basic-on-smartresponse-xe
Me too. For simple things it does not matter, you can calculate 3+5 on any calculator, but as soon as a formula gets more complicated and you want to start using brackets RPN is so much easier for data entry. RPN was a great help for me during school time to enter formulas into my calculator without typing errors. The great advantage of RPN, is that when you press an operator key, it executes it. If you pres “plus”, it does an addition, if you press “sin()” it executes the sine function.
And despite that I love my old HP48G, I find Forth truly horrifying. Data entry in RPN for a calculator is fine, but reading text in RPN notation is horrifying.
But these days, I just paste some text in a python window and fiddle a bit with it until it works. My HP48G is at arms reach, but I very rarely turn it on.
I couldn’t afford to buy the HP-41 I wanted so I wrote an HP-41 emulator in ZBasic on my Apple 2e.
i use dc every day and less often a kind of hp rpn calculator knockoff app i made for android. i wish i had something in between those two extremes. orpie is pretty cool but it’s too ‘weird’, a real voyage of discovery every time i use it. rpncalc was alright but had a different and just as bad set of limits, and it doesn’t seem to have a debian package anymore. i should just hack my android app to have a commandline interface, i guess.
Yeah, I use Orpie a lot (even forked it and added some features), but probably mostly because I feel cool doing so rather than because it’s efficient, hahaha
Used a new version HP-35s for hard core number crunching through grad school. Not only was it massively easier, pretty much no one could figure out how to use it thus no one stole it.
Finance people still use HP calcs for TVM (I do all the time and it has saved me tons of $$$ figuring out repayment plans for student loans)
And I’m not a programmer but I’m told pretty much anyone com-sci inclined is very familiar with stack operations.
RPN is dead? Stuff.
I had a Sharp EL 5100 programmable calculator where you could type in equations exactly like they are written out complete with nested parentheses. I used it for a couple of years in college for my math and physics courses until it got stolen. Then I got an HP 15C. RPN was MUCH faster for complicated equations than trying to keep track of the parentheses and order of operations gymnastics of the Sharp. I still have a 15C I got used on eBay on my desk and an emulator on my iPhone.
HP wasn’t the only one with RPN. I still have my Corvus 500.
IIRC, Sinclair did too.
I found a link:
http://rk.nvg.ntnu.no/sinclair/calculators/scientific.htm
I still have the HP28S I had in college in the 90s.
I had replaced the IR led with a serial port back then and I was using it as a Teletext recorder/player (french Minitel).
I did a bit of assembly on it too and some if my schoolmates were writing graphic games for it.
I miss those days sometimes :)
I still have my HP-42S. But these days I calculate using Free42 (a HP-42S emulator) on my phone, Excalibur or Free42 on Windows, and the Apple calculator in RPN mode on MacOS.
This. 1+
HP currently manufactures and sells a modern variant of the HP-15C, the HP-15CE with an expanded memory mode as a bonus!
Aaaaand, one can load software into it to become a 16C!
(Ofc, it voids the warranty.) Keyboard overlays are available.
I admit it, I “cut my teeth” on HP calculators in the 1970s, but complex infix notation with parentheses only became easy to use once 5×7 dot matrix alphanumeric displays became available that could show the user their whole algebraic expression before hitting the = sign. in the era with only numeric calculator displays, you had to keep the expression and its parentheses in your head, which I claim, was a bigger (or at least equivalent) mental burden to RPN.
Ah, I love these posts – they bring out all the oldsters (of which I’m one) either saying, “I used one!” or “I still use them!”
I still use them! All my calculators are RPN. My daily drivers are 35S’s but I have a couple of the classics, a 32S II which unfortunately has a bad key, and an 11C which might actually be worth money except it lost it’s logo.
Time for my monthly plug for
https://hpmuseum.org/
“People say RPN, because they are afraid to pronounce Lukasiewicz!”
-one of my CompSci instructors
https://en.m.wikipedia.org/wiki/Jan_%C5%81ukasiewicz
I have an HP-41CV and all the attachments (various plug-in modules, extra memory, card reader, printer, and HP-IL interface) which I used as a Navigator in the US Navy back in 1981. Among other things, I wrote a program to calibrate the magnetic compass on the bridge. It is the only calculator I use and still works. LOVE RPN!!!!!
Hooray! I still have my HP-41CX with original box, leatherette belt case and manuals. I still use it and RPN to this day. I tried to get my daughter accustomed to RPN on a new HP-35S, but the schools basically require TI graphing calculators these days. Good job, TI sales team. You’ve slowed down calculations for generations…
I frequently use Orpie (an rpn terminal calculator)…though I suspect it’s mostly because it maakes me feel cool.
HP 11C is the only way to fly…
I use my 40+ year old 15c daily, 32SII, and 35 as needed. Still wish my 41CX worked. Realcalc on my android is ok but nothing beats the muscle memory of the 15c for day to day work.
Can you tell I’m an about to retire engineer?
A classic bumper sticker of that era: “YOU FORTH LOVE IF HONK THEN”