The early history of HP calculators
insights.hpe.com
insights.hpe.com
Now I don't see any of the students using them. What happened? When I used to teach, I would write a large expression on the board and challenge students to a calculator duel -- me using my 1985 HP41CX and them using their lumbering infix calculator. I would always win.
The magic is the automatic saving of subexpressions on a stack. Once you got the hang of it, you would never want to go back to an infix calculator.
I have the HP41C app on my iPhone, but you miss the beautiful haptic feedback keys that the HP calc's had.
Actually, the very first programming course I ever took was a 2 credit course called "Programming Calculators" and we learned to program to the HP41. When a program was running, a little "bird" glyph would "fly" flom left to right across the LCD screen. I remember writing a program to get the bird to fly backwards. Silly, but fun.
Of course I had the Math Module that you could plug in and the magnet card reader. Anyway, I always wondered what happened in the intervening time that no one seems to use them anymore.
In all my life I've only ever seen two HP RPN calculators. One belonged to my high-school chem teacher, the other to a real estate agent. If there were a $30 RPN calculator with similar functions, I would use it.
Edit: 18 years later and they still make it, https://www.casio.com/products/calculators/fraction-and-scie...
Edit2: Looks like the most readily available RPN calculators are the HP 35S ($55) and HP 12C ($50).
I was one of these smug HP calculator owners back in high school and college. I loved it and spent hours hacking on it (and also secretly enjoyed the fact that nobody borrowed it since hardly anyone knew how to use it).
Years later, I started realizing that the reason why these calculators do take fewer keypresses to make calculations is because they borrow your brain to assist them.
For example, you see `3 * (2 + 4)` and your brain has to identify the most nested parenthesis expression, type that in and work your way out. It works well enough for simple expressions but doesn't really scale very far beyond that.
Remember this SETI program that used people's idle CPU's to scan sky pictures? I felt HP calculators had been pulling the same trick by borrowing your brain to calculate their expressions.
I felt that I had been cheated but I wasn't really mad about it because I loved these calculators so much.
edit: 42S not 42C
When you encounter an open parenthesis, then you just push the following number onto the stack, when you encounter a close parenthesis, you just perform the relevant arithmetic operation.
For the example
2 * (3 + 4)
we can do this Input Stack
2 2
3 3,2
4 4,3,2
+ 7,2
* 14 2 * (3 + (4 + (5 + (6 + 7))
The only way to process this is to determine the most nested expression and start there: 6 7 + 5 + 4 + 3 + 2 *
... you get the idea.Expand this expression with multiple deeply nested parens and the limitations of RPN become very obvious.
4 is usually enough in practice anyway. Your example is artificial.
Besides, are you sure your infix calculator will accept this deep a nesting of parentheses? The TI models that were contemporary with the early HPs certainly wouldn't!
Of course, you're comparing the HP41C to bad infix calculators, early ones that didn't support algebraic order of operations or explicit parentheses.
It's worth remembering that postfix calculators exist not because they were ever the right thing to do, but because they were easier to implement with limited computing power. Forcing the user to keep track of the stack context was a clever hack on HP's part, but is no longer necessary or justifiable. And that's why you don't see many new postfix calculators these days.
Closest thing I can recall was the contest that pitted a texting teenager against an experienced ham radio operator with a telegraph key...
I don't get it either. Even if HP lost interest, why didn't anyone continue with RPN (patents, maybe?).
I think RPN is both better for learning at school (you see intermediates, and you learn operator order), as well as general use. I love that you can just get stuck in calculating without having to worry about getting it all in the right order at first.
I'd love my children to use RPN when they reach that age, but there is a lack of RPN calculators on the market, a lack of knowledge at school and it may even be banned by the time they need to take an exam.
Even better if I don't have to worry about it at all. That's why I'm using a calculator in the first place, and not scribbling figures by hand on a piece of paper.
One day I came across it and started noodling. Pretty soon figured out you could program the calculator to do the main calculations for my job. What was supposed to be an all-Summer project ended up finished in less than two weeks! (I still got paid for the whole work. Thanks Dad!)
That was my first taste of how programming machines can save time.
A few years later I bought myself an HP-41C with a card-reader attachment and then discovered 'synthetic programming' (one of the earliest versions of 'jailbreaking').
These were all gateway drugs. Have been hooked on programming ever since.
Thanks for bringing back all kinds of fond memories.
[1] http://www.swissmicros.com/
[2] https://www.youtube.com/watch?v=8LatjXPgLI8
EDIT: I don't have any involvement with swissmicros apart from anticipating their new calculator
However, you're looking for the best all-round scientific calculator (form factor restricted!) the 42s probably wins. The voyager series (including the 15 and 16) were well-made and in landscape format, which is nice for using on-the-go with both thumbs. They are more simplistic though - you see one line of the stack, and there aren't menus - hence several variations to cater for different markets.
The HP41 was an impressive programmable calculator for its time, and seems to be more expandable than the 42s. However, the 42s is programmable, has a few more features and a more modern display.
Not sure about the WP34, though if you look at the cost of a second hand 42s, you'll see that many people rate it much higher than more modern HP calculators. I think what puts me off more recent calculators and even some other HPs, is the ambivalence about RPN. I really like RPN, and don't like when the UI is compromised to please both.
[1] http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/archv005.cg...
Back in the day, HP had nice sales literature that described the differences between the models quite nicely.
> And how does -48 compare, besides the relatively useless graphing capability?
The -42 and -48 were both intended to be successors, of a sort, to the HP-41 family. The -42 It was less expensive than a -48, and placed more emphasis on a function-per-key style of operation, as well as -41 compatibility. (The -42 was program source-code compatible with a nicely loaded instance of a -41.) Where the -42 suffered in comparison to the -41 was that it did not offer any kind of expansion slots, and, unlike the -41, the -42 was never intended to be the 'top of the line'.
To understand the -48, you need to look back to the -28 (as well as a couple of similar business models). After developing the -41, HP realized that they needed a new higher level internal programming model to take the calculator line to where they wanted it to go. In reaction to their growing ambitions, they developed a language for their calculators called RPL... Reverse Polish Lisp. There are a few examples of RPL in this thread, but if you think of a dynamically typed type safe variant of FORTH you wouldn't be far off from RPL. It was RPL that brought features like symbolic algebra, graphics, and a >4 level stack HP's product line, and it was the -28 that was the first scientific instance of this platform. However, the -28 was a bulky clamshell design, behaved fairly differently from a -41, and was sold in parallel with the (still popular) -41 series.
The -48 was a more spiritual successor to both the -41 and the -28. The -48 unified the new programming model of the -28 with the non-folding portrait style casing of the -28. The -48 also added a serial port and a couple expansion ports, so it carried forward some of the -41's legacy of expandability.
> I see lots of people also preferring some other models (15, 16, 35, 41 etc), which I would have imagined to be strict subsets of these "juggernauts", but maybe that is not the case?
I have an -11, a couple -48 variants, and a -42 emulator on my phone. While the -48 is strictly the most powerful, it can also be a bit cumbersome to use. The smaller platforms have their place.
My 50g is an excellent machine.
It's funny to watch other (newer) developers reactions when they ask to borrow the calculator that's usually on my desk (a 42S) and then give it back several minutes later, with a puzzled look on their faces.
-- HP calc owner
Last year I finally read the whole manual (as a teen I only used the symbolic differentiator, most useful and magical to my brain at the time). Since I learned about Lisp, so RPN programming features appealed to me. I realized that:
1) RPN has lambda << 2 + >> means (lambda (...) (+ 2 ...))
2) RPN has a short syntax for them << a -> a 2 + >>
Yes, 1990 HP RPN had arrow notation out of the box. Take that ES6 !
ps: there are some Chuck Moore talks on youtube that are worth gold. His CPUs are heaven
then https://www.youtube.com/results?search_query=chuck+moore+ga1...
https://www.youtube.com/watch?v=odBjuSCX8jE
and Kalny's videos https://www.youtube.com/watch?v=KSTjQA-iz4w
The syntax is slightly different. What it should be is this
<< -> a << a 2 + >> >>
The arrow introduces a binding form that captures the top n levels of the stack into n named local variables. (There's also a lower level implementation that forgoes the names in favor of a lookup-by-ordinal scheme that's a lot faster.)
The other notable difference from what you might expect is that the lexical environment is not captured:
Consider this function:
<< -> a << << a 2 + >> >> >>
What it returns is a function object that looks like this, except that 'a' is a local variable reference rather than the global variable reference it looks like:
<< a 2 + >>
Evaluating this results in an error, because while 'a' is represented as a local variable reference, the environment containing the local binding for 'a' is no longer available.
I just put out my hp49.. god how I love these things.
ps: I just found out the latest attempt I did last years was a var called REC = << -> U << U U EVAL >> >> .. pretty sure I was trying a fixpoint CPS factorial in RPN
256 steps of program!
I could write small programs that calculated coordinates for road topography, circular curves and even (with a very little approximation) clothoids.
And you will have to pry out from my cold, dead hands my HP 28C[0][1], I bought it right when it came out in 1987 (yes, that is exactly 30 years ago) and it still goes strong.
But to give you a data point, I payed for it (in 1987) around 650,000 Lire, something like the equivalent to 330 Euro that nowadays would be roughly 750 Euro.
Allegedly some people hacked interfaces between their PDP-11 and their overclocked HP-41 that allowed the PDP-11 to use the calculator as a floating point coprocessor.
The HP 41 had something called "synthetic programming", a flaw that someone once found in the calculator that allowed access to a lot of its internals, including brand new opcodes and capabilities (even graphics, which the HP 41 didn't officially support).
The downside was that doing the wrong thing could cause the calculator to shut down sometimes for days in a row. I once did that to my father's calculator and these were the longest days in my life, dreading that I might have broken his $300+ purchase for silly programming antics.
Hmm... I don't recall if it was the A or B. But, here is a video that is more than you wanted to know:
https://m.youtube.com/watch?v=JmTyrS-jfi0
If you're curious, I hated it. In retrospect, it was pretty awesome. At the time, I hated it. I basically hated computers up until the mid-90s. I didn't really like them for another ten years. Now, the relationship is like that of old adversaries that are too tired to fight any longer.
One of my childhood friends had a father who was a licensed surveyor and civil engineer. He showed me how to write programs one one of these calculators. I was fascinated with it, and started writing simple programs to do obscure calculations. After I showed him what I had figured out, he showed me how to remove the faceplate and access a special test mode by pushing some hidden buttons near the . key at the bottom.
In retrospect, I can't figure out how some civil engineer in a rural area knew how to access and use these test functions. Probably, he had a friend from the university who worked at HP or something.
I remember that these calculators use something called RPN (Reverse Polish Notation). To do "3+4" you enter 3 <enter> 4 <enter> + <enter>. I had a university professor ask once, what's the opposite of RPN: when you enter "+ 3 4"? One other student answered "Reverse Italian notation?" And everyone in the class laughed so hard...
That's it. Note that this is one keystroke less than the regular calculators used by mere mortals, and that is why RPN rules.
Source: my daily driver HP-15C that I've had since around 1985. Works perfectly and has only gone through two or three sets of batteries. I'd swear it was solar powered.
[3] [+] [4] [=]
[3] [Enter] [4] [+]
Both use four keystrokes.
See here:
http://calculatorauthority.com/why-use-a-reverse-polish-nota...
>For example, we want to compute “(13+3)÷(4×2)” using a calculator of algebraic notation (not a scientific one) then we have to do many steps to reach the answer. Firstly, we have to compute “(13+3)” and then we will save the answer to the memory of the calculator. Then we have to compute the calculation in the denominator i.e. “(4×2)” and we have to save this answer too to the memory of the calculator. In the end, we will bring both the answers and will perform the last operation of division. This procedure has taken a reasonable amount of time. This thing can be avoided by using RPN calculator. In RPN calculator, we have to insert just a single line expression as “13 Enter 3 + 4 Enter 2 × ÷” and the answer will be computed instantly.
More generally the use of a stack (in the case of some calculators an actually visible stack) helps a lot with complex formulas.
[1 3 + 3 = ÷ 4 ÷ 2 =] is also 10 button presses, and how I would have entered it on an infix $10 TI-30XA during an exam. (At least, it's how I would have entered it if the figures weren't so small.) You could argue that it's cheating to "cook" the input beforehand so that the '4×2' divisor becomes two '4' and '2' divisors, but then you would have to ignore that RPN requires its own pre-cooked input (and that of the two, the RPN form is the one that relies on a more extensive cook).
> At least, it's how I would have entered it if the figures weren't so small.
There is no "cooking" in the RPN input, the way you input is a little more similar to how you do manually operations, and in the order numbers are written from left to right, but of course beauty is only in the eye of the beholder.
A (as well small) advantage is that on RPN you "see" that you are dividing 16 by 8, particularly - as hinted previously - when you have a RPN calculator that allows you to visualize the stack you can see better "partial" results.
Now be nice, and do (13+3)/(3x(SQR(4+2))).
[1 3 Enter 3 + 3 Enter 4 Enter 2 + SQR * /]
You do your pen and paper algebra in RPN?
The point of my "cooked" input comment wasn't to say that the mental overhead to convert to RPN is complicated or cannot come naturally after some time getting used to it; it was a defense of my swapping the division operation to multiply by the reciprocal. The idea is that if I hadn't pre-emptively addressed this in my first comment, I expected for someone to claim that I was cheating and feeding in "cooked" input for the infix case. My point is that if you recognize that converting to RPN is trivial and want to count that as a zero-cost operation when scoring the efficiency of RPN, then you have to recognize that converting the divisor to a reciprocal factor is just as trivial (moreso, really) and should be scored as a zero-cost operation, too.
Otherwise, what you have is an inconsistent standard where the infix conversion gets arbitrarily counted against the infix case, but the RPN conversion is somehow "free".
> Now be nice, and do (13+3)/(3x(SQR(4+2)))
I got 15 button presses, compared to your 14. I can live with that, given this is a calculator that can be picked up for $10. And that's the biggest savings, considering that the other things I had to worry about as a student were being gouged by mandatory meal plans and expensive, low-quality, on-campus housing.
FWIW, I actually like postfix notation.[1]
http://www.foundersatwork.com/steve-wozniak.html
https://hpinspace.wordpress.com/2009/07/16/hp-65-and-apollo-...
[0] https://play.google.com/store/apps/details?id=org.ab.x48
I also had a 48GX but sold it -- I didn't use it, and I preferred the more compact Voyager series, even if the stack isn't displayed on screen. I agree that the build quality has dropped over time, but I'd still choose an RPN HP over anything else.
I sniped a 48SX on a Craigslist equivalent for 20$, the guy even sold the full manual and 3 math/asm books, I couldn't resist.
I'm learning electronics, I plan to mod it if I can, maybe an ESP8266 "coprocessor", a rechargeable lithium bat. and a usb port.
I was always impressed that the keys used two color injection molding for the primary labels. There was almost literally no way to wear the label off the keys, since the label was built into the plastic.
BTW I have also a HP 48GX but some buttons become unusable. What is the best shop to repair it?
Those two items were status symbol back then.
Could someone who's used both talk a bit about how they compare? Are calc and emacs missing something that made HP great?
I used a hp 32S in college, less mistakes make with rpn then entering calculations the other way. though newer calculator allow entering of whole equations ((10 *5)^2)/3 made this less useful.
The hand helds are more portable than emacs.
https://www.gnu.org/software/emacs/manual/html_mono/calc.htm...
It's not the same, but having used both, they are very similar in overall feel.
> Are calc and emacs missing something that made HP great?
A couple things:
First, having specific hardware is (was?) a nice thing.
Secondly, the HP28/48 programming model was very, very orthogonal. It was a more impoverished Lisp than even elisp is today, but it pervaded the entire software stack. While people referred to 'RPL' and 'System RPL' with two different names, the truth is that there was no real distinction between the programming language you used as a user and the programming language used by HP to build the machine in the first place. This kind of solidity and general 'gestalt' pervaded the operation of the machine and made them joys to use.
But you can pry it from my cold dead hand because the snap of those lovely keys under your fingers and that stack scrolling up that screen is the visceral feeling of math.
I grew up on RPN, and have always considered knowing it as a "strategic" advantage.