Hacker News new | past | comments | ask | show | jobs | submit login
Free42 – An HP-42S Calculator Simulator (thomasokken.com)
80 points by abiro on May 11, 2023 | hide | past | favorite | 35 comments



This IMHO very important information is buried near the bottom of the page:

The HP-42S represents numbers with a 12-digit decimal mantissa, and an exponent from 10^−499 to 10^499; Free42 Decimal uses a 34-digit decimal mantissa, and an exponent from 10^−6143 to 10^6144; and Free42 Binary uses native binary floating-point, which on all currently supported platforms is IEEE-754 double precision, with a 53-bit binary mantissa which is roughly equivalent to 16 decimal digits, with an exponent from 10^−308 to 10^308.

In other words, results will not be exactly the same as a real HP-42S. For a more authentic HP-42S experience, there's Emu42.

Also, just about every dedicated calculator uses decimal floating point for several reasons, such as simpler circuitry in the ASIC and keeping the human intuition that 0.1 + 0.1 is actually 0.2.


There is a fork with that available.

as posted below:

For anyone that wants a physical version, SwissMicros makes a calculator based off of Free42: https://www.swissmicros.com/product/dm42

That website mentions that they use decimal floating point. Since free42 is licensed under gpl3, they have released the source.

https://github.com/swissmicros/DM42PGM/tree/master/lib

https://github.com/swissmicros/free42/tree/master/inteldecim...

They use Intel's library for decimal floating point: https://software.intel.com/en-us/articles/intel-decimal-floa...

It's still not the real HP-42S with its quirks, but it's nice to have decimal floating point operations.


Aside from keyboard not being quite at HP level (but then which one is? And it is still good), DM42 is entirely better version tbh. Even works with printer!

Weird obscure fact: The printer head for HP calculator printer was still available as new parts as late as 2019, coz it was used in variety of devices, I bought cheap non-working one and just replaced the head


The way you're using "decimal floating point" seems to imply there is a "floating point" that is not "decimal".

My understanding is that "decimal", in the context of programming, is a less-precise term to mean floating-point (i.e. encompassing IEEE 754 floats, double- vs single-precision, etc), because they're all binary numbers if you dig deep enough, right?

But apparently I am incorrect/underinformed about this.

What is "decimal", then?


Decimal means base 10. Decimus is the Latin word for 10, and deci- is the SI prefix for 1/10, e.g. decimeter is 1/10 of a meter. Decimal floating point is x*10^y whereas binary floating point is x*2^y . Compare to hexadecimal which means base 16.


Derp. I misunderstood.


IEEE-758 floating point standard defines decimal formats, decimal128 is relevant here, I believe that is what free42 uses: https://en.wikipedia.org/wiki/Decimal128_floating-point_form...


For anyone that wants a physical version, SwissMicros makes a calculator based off of Free42: https://www.swissmicros.com/product/dm42


That page says the HP-42S was "widely regarded as one of the most desired calculators ever made". Was it more "desired" than the HP-41C, with all the accessories that you could get for it?


They're products of different eras - ten years separate the two. The 41 is almost pre-personal computer. By the time the 42 rolls around, personal computing is already well established. This is particularly true in the market segments that were buying calculators.

HP was also working to rationalize its product line at the time. The 41 was introduced as the high-end offering, but a few years later, they also introduced the 28C/S. These were intended as next-generation offerings. The 28 was arguably higher end than the 41, but it wasn't expandable and had a more cumbersome UI. For a few years, this left HP with two disjoint high end offerings.

To address this, HP slotted the 48SX in as a partial replacement for both the 41 and the 28. (Hence the name). The 48 improved on the 28 a bit, switched back to a traditional handheld calculator form factor, and brought in the expansion and bidirectional I/O from the 41. But it still had the more cumbersome UI of the 28.

The 42 was slotted below the 48 as a more direct replacement of the 41. A very similar UI to the 41 but built on the newer technology. A few years after all of this, the entire business essentially shut down. (See my earlier point on the emergence of personal computing, and particularly laptops. The calculator niche narrowed down to essentially the vanishing point, outside of education.)

Where this left the 42 is as the last and best of HP's traditional calculators. It's prized because of both the capabilities, and the lack of expansion doesn't matter that much. There are better options for that.

This is a long answer, I know, but the short story is that as a practical tool, the 42 is probably the better choice these days. (Although if you need something like an HP-IL barcode scanner or something, you need a 41.)


The 41C came out about 10 years before the 42S. Each would have their fans. The 42S doesn't have the hardware expand-ability but is generally faster and a bit more refined. If I wanted a nice handheld calculator today, I'd prefer the HP-42S or the Swiss Micro version. However, Swiss Micros have a 41C clone as well, if you prefer that.


The 42S was also mostly backward compatible with programs written for the 41C, intending to be its modern replacement. It did have an IR connection for some expandability (this was pre-USB era).

I'll also note that, with regards to using an HP42S today, most of their LCD screens have not aged super well and have faded a lot. Other models like the HP15 and HP32S(ii) have LCD screens that seem to age a bit better for whatever reason (potentially the support for the menu and limited graphing behavior of the 42S required some slightly different LCD parts). I have all these models, but wouldn't recommend an original 42S to anyone but a collector due to screen visibility issues - my HP15C and HP32S are plenty usable still though.

I also highly recommend the Swiss Micro replicas if you like RPN calcs. Very solid attempts at reproducing and modernizing some timeless calculators.


While I own a few HP calculators, my favorite is still the HP-28. Not sure why it isn't as remembered as the other models, but it's the one I still reach for whenever need to calculate anything.


> While I own a few HP calculators, my favorite is still the HP-28. Not sure why it isn't as remembered as the other models,

I've been a big 48 fan for years. (The 48 and the 28 are very similar.)

I think they both suffer a bit from design overreach. The devices are very capable, but the capability can make them more cumbersome to use than earlier, simpler devices. And then the 28 has the problem that with the flip out case it isn't really a handheld.

The result is that compared to contemporary calculators they were more difficult to use and compared to contemporary computers they weren't nearly as capable. So they fell into a gap, and there wasn't enough life left in the calculator market left to fund a way out.

Another way of looking at this is that the 28 was a v1 product, the 48 was a v2 product, and there wasn't ever the v3 product (where v3 is usually where products hit their stride). I don't really count the 49 or 50 because by that time, the calculator division had been radically restructured and those products were the output of a very different kind of engineering process. (No offense to Jean-Yves Avenard, who did great work within the constraints of the time.)


The flip case is a large reason why I prefer the 28 though. When I just need a calculator, fold it back and it's a handheld calculator. When I want to program, fold it out like a book and have a more extensive keyboard. Best of both worlds.

I should find a 48, don't have one of those. I have a 50 but don't like it much. I keep it in the office for basic use.


> The flip case is a large reason why I prefer the 28 though

I can see the split case might have some benefits. It wouldn't work the way you describe, but I wish they'd put scientific calculator hardware in the 200LX case. Nice display and great keyboard. (The 200LX _did_ have a built in program that acted a little like an 18C business calculator.)

> I should find a 48, don't have one of those

I have both a 48SX and a GX. I like the form factor of both better than the 50, although the hardware on the 50 is much better. (If I remember properly, they replaced the custom Saturn CPU in the 50 with an ARM chip running an emulator... it's overall much faster.) Neither of mine get much use, but they do have lots of sentimental value.


I can recommend them as I did get one as a gadget.

I don’t have a HUGE use for it, but it’s really well done, feels really sturdy and somewhat premium. It was amusing to learn (and re-learn on rare use) more advanced features and programming it.

Sure, one can do that with emulator but physicality adds to the fun.


I also have DM-16L and I do get some reasonable use out of that, It's programmer's calculator so a bunch of bitwise operations are readily available and have buttons for directly switching modes.


This is something I realized playing with the C64 Maxi. It’s a full sized C64 replica (mine is a VIC 20) and feels very real, even though there is a small ARM board inside it. Physicality is a huge part of the retro experience and a lot of it is the keyboard (which uses a TTY layout).

I wish someone made modern keyboards with Amiga, Atari, Alto, Symbolics, Sun, or DEC LK layouts for use with emulated platforms.


This app is my daily driver. It was hard to find in the App Store though when I searched for rpn calculators, it was a huge relief to find it.

Little known perhaps but you can tap the display to bring up the main menu. From there you can optionally select a different skin. I use GDW-Modern-i5, a nice clean darkmode with orange highlights.

Edit: actually you have to download new skins from a gallery webpage first via what I can only describe as a tiny embedded web browser you can bring up by clicking "Load..." in the bottom left corner. Truly this must be God's own calculator app.


I had an HP 42S in college. was best calculator I have ever owned, and had used the programmable features in it.

I have used Free42 on Macs and iPhones for years. love it.

Plus42 improves upon it by expanding the display size, suitable for the aspect ratio and size of iPhone screens and Macs


Thank you for the plus hint. Very nice. Worth the price.


I've used the free42 (and newer plus42) app on my phone for nearly a decade now. In the UK, RPN calculators were pretty much not seen in the school place. We had Casios, Sharps, and those really into maths tended to get TI graphing calculators.

The beauty of RPN is that you can get the data into the calculator before you figure out how you're going to calculate the thing you want to know. The roll and x<>y help you to manipulate the data, and once you get the hang of it, algebraic notation feels slow and unintuitive (back pedalling through notation to get brackets in place for example).

You also get intermediate results to sense-check as you're going along.

I recently got a DM42 from swissmicros, which is a real life calculator running free42. It is beautifully made, and it makes me happy that I have it. But my job isn't in one place, so I still probably use the phone app more.


There is also Plus42 by the same person which is what I use on my phone. https://thomasokken.com/plus42/

I have a 42S and 15C, I tend to use Plus42 the most, then the 15C.


I have Free42 on my iPhone and while I don't use any of the advanced features, it has a level of polish that really makes it stand far from the crowd. Probably the most noticeable feature is the haptic feedback (enabled in the hidden menu under the logo). That feature and the full screen graphics goes a long way to making the calculator feel real.


I've had the iOS version of Free42 in my pocket for over a decade now. My real 42S is safe in a drawer. Highly recommended.


The 42S was my calculator as a structural engineering student in the early 90s.

I now regularly use the Android version of Free42 - I should try and find my old manuals though, so I could operate it as well as I used to.


This reminded me that after 30 years I need to change batteries on mine.


Amazing! Now, if you only have this for HP-48SX :).


I enjoy Droid48 for this.


My go-to for quick-but-slightly-involved calculations--I love having an HP-48 in my pocket! (and honestly, I appreciate the slightly-smaller form factor better than the original ;-) )


Am I the only one who think the 41CX totally outclasses the 42 series?


The primary difference is simply the expandability of the 41 series, plus the hacking of synthetic programming.

Outside of that, as a calculator, the 42s is a better, more capable device.

Make no mistake, the 41 series was very cool. How many other calculators had floppy drives, plus whatever else you could wire into the 41.

But the 42s is just flat out a better calculator.

I have Free42 on my iPhone, but I typically reach for iHP48 over the 42. Just more comfortable with it.


I still have my 41C, not that I use it much any more, plus some cards, case, and such. Wish I could find a good home for it.


I have the iOS i41CX+ app. I love it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: