Behavior of an old nixie calculator with fixed decimal places

274 views
Skip to first unread message

newxito

unread,
Dec 27, 2024, 3:20:01 PM12/27/24
to neonixie-l
Some of the old Nixie calculators have a switch to set fixed decimal places and I'm trying to reproduce this behavior in the firmware. I thought it would be easy, but a few questions have come up.

Maybe someone who has such an old calculator can help.

Let's assume that the calculator has a total of 10 Nixies and the fixed decimal places are set to 2.

- What happens if I enter 12.999? Is that even possible?

- If possible, what happens if I then press “+”? Does it round up and show 13.00 or does it show 12.99?

- For subsequent calculations, does it use the displayed value or the entered/calculated value with all decimal places?

- How is a result like 1234567890.65 displayed? 34567890.65 and overflow? 1234567890 with no decimals? Something else?

Thanks
Andy

Mac Doktor

unread,
Dec 27, 2024, 5:08:44 PM12/27/24
to neonixie-l
Some random thoughts...


On Dec 27, 2024, at 3:20 PM, newxito <axt...@gmail.com> wrote:

- What happens if I enter 12.999? Is that even possible?

- For subsequent calculations, does it use the displayed value or the entered/calculated value with all decimal places?

In fixed mode my RPN calculator displays everything you enter and then truncates that to two decimal places on both the display and internally. It's commonly used for financial calculations so I would assume it's rounded up.


- How is a result like 1234567890.65 displayed? 34567890.65 and overflow? 1234567890 with no decimals? Something else?

Normally you'd use scientific notation for floating point operations with lots of decimal places:

123.456 = 1.23456E2

The snag here is that you don't have "E" or a minus sign for numbers < 0 without alphanumeric tubes. Problematic.

I suppose you could at least use neon lamps and optic fibers to create decimal points. Commas would be cute.


What would really interest me is an RPN calculator. My beloved HP is out of production and used ones are going for $125 on eBay. I programmed in FORTH back in the day (Apple ][+; I still have it) and became very comfortable doing stack-based math. Once you get used to RPN you never go back.

With alphanumeric tubes you can also do hexadecimal, the other thing that I'd like to be able to never go back from. I hope that last sentence makes sense. RPN, hex, I'm there.


Terry Bowman, KA4HJH
"The Mac Doctor"

https://www.astarcloseup.com

"Would you like to see the relevant data?"—343 Guilty Spark, Halo 2

Leroy Jones

unread,
Dec 27, 2024, 5:33:38 PM12/27/24
to neonixie-l
RPN is the only way to go.    I have been using my trusty old HP15C since it was new in 1984.
Wrote a short program for it that translates between decimal and hexadecimal.
When displaying a hex number, (two) digit places are used to display 11,12,13,14,15 (more commonly called A,B,C,D,E.F)
The program is set up so that when ever it is displaying one of those jury-rigged hex results, the display blinks to remind me to read
it as hex.    In my humble opinion, HP15C is by far the best hand held computer ever made.

Oskar

unread,
Dec 27, 2024, 5:37:00 PM12/27/24
to neonixie-l
Here is how my Sharp Compet 23 handles these situations:

>  What happens if I enter 12.999? Is that even possible?

You can enter 12.999, it will be displayed as 12.999 until you confirm.


>   If possible, what happens if I then press “+”? Does it round up and show 13.00 or does it show 12.99?

There is no plus key on the calculator, since it uses RPN for addition and subtraction. Upon confirming with the equals keys, the value is truncated to 12.99.

> For subsequent calculations, does it use the displayed value or the entered/calculated value with all decimal places?

It uses the displayed value. Information about additional decimal places is lost.

> How is a result like 1234567890.65 displayed? 34567890.65 and overflow? 1234567890 with no decimals? Something else?

It displays 34567890.65, but with a lot of random decimal points and the overflow bulb being illuminated.

Hope this helps,
Oskar

newxito

unread,
Dec 28, 2024, 1:50:33 AM12/28/24
to neonixie-l
That's very helpful, thanks!

newxito

unread,
Dec 28, 2024, 2:23:43 AM12/28/24
to neonixie-l
I think that even without changing any board, it shouldn't be that difficult to make a RPN version with scientific notation.
Replacing some key caps, replacing one of the nixie sockets with a horizontal neon and changing the firmware should do the trick. I probably will give it a try next year.

Benoit Tourret

unread,
Dec 28, 2024, 7:38:38 AM12/28/24
to neonixie-l
Hello,
did you had a look to Github 14-digits-nixie-calculator ? 
there should be some idea to find...

newxito

unread,
Dec 28, 2024, 2:28:57 PM12/28/24
to neonixie-l
That's the calculator I'm trying to improve with the fixed decimals feature. I think this will be my last major firmware change (for the non RPN version).

Mac Doktor

unread,
Dec 28, 2024, 3:19:10 PM12/28/24
to neonixie-l
On Dec 27, 2024, at 5:33 PM, Leroy Jones <leroypu...@gmail.com> wrote:

RPN is the only way to go.    I have been using my trusty old HP15C since it was new in 1984.

I had a TI-57 when I was in high school around 1979 (HPs were too expensive). A whopping 40 steps. In physics class we programmed it to display things like "7734" one number at a time while turned it upside down.


In my humble opinion, HP15C is by far the best hand held computer ever made.

Here is the longer version of my tale of two calculators:



I've never programmed either of them but it's nice to know that that I can. My only complaint is that none of the display modes of my newer calc are exactly right for my needs. IIRC it has to do with the zero blanking. The previous calculator was perfect. Perhaps there's open source firmware out there that can be modified. Hmm...

Got the Apple ][+ in 1982. 8D


Terry Bowman, KA4HJH
"The Mac Doctor"


"I’ve seen things you people wouldn’t believe. Attack ships on fire off the shoulder of Orion. I watched c-beams glitter in the dark near Tannhäuser Gate. 

"All those moments will be lost in time like tears in the rain."— Roy Batty, Blade Runner

Mark Moulding

unread,
Dec 30, 2024, 2:39:56 PM12/30/24
to neonixie-l
> RPN is the only way to go.   <...>   In my humble opinion, HP15C is by far the best hand held computer ever made.

When I was doing a lot of deeply embedded programming (8051s with 2k of ROM), my HP 16C was my ever-present companion.  It's still in perfect condition, and I've supplemented it with an app on my phone, and an emulator on my PC, both of which get frequent use still.  I also have a half-size fully functional model from SwissMicros - they have a lot of other drool-worthy products as well...

newxito

unread,
Jan 3, 2025, 12:06:44 PM1/3/25
to neonixie-l
I ended up implementing fixed decimals as follows:
- Input can float but is rounded to the defined fixed decimal places
- Internal registers are also rounded to the defined fixed decimal places, additional decimals are lost for subsequent calculations.
- To avoid early overflow, the decimal places of the results are dynamically reduced if needed. This behavior can be found, for example, in the Friden EC 1117
- Since I don’t have a switch, the fixed decimal places are set using the keyboard.

Here is a little demo with the IN-12 version…

Mac Doktor

unread,
Jan 3, 2025, 1:37:10 PM1/3/25
to neonixie-l

On Jan 3, 2025, at 12:06 PM, newxito <axt...@gmail.com> wrote:

Here is a little demo with the IN-12 version…

Lookin' good. Up next, RPN.  8D


Terry Bowman, KA4HJH
"The Mac Doctor"

https://www.astarcloseup.com

"2001: A Space Odyssey is in many respects a silent film."—Roger Ebert

newxito

unread,
Jan 3, 2025, 2:04:19 PM1/3/25
to neonixie-l
I don't know if this guys made their project open source...

newxito

unread,
Jan 3, 2025, 2:08:57 PM1/3/25
to neonixie-l
these guys... 

Mac Doktor

unread,
Jan 3, 2025, 2:26:31 PM1/3/25
to neonixie-l

On Jan 3, 2025, at 2:04 PM, newxito <axt...@gmail.com> wrote:

I don't know if this guys made their project open source...


Beautiful but too expensive for me. Does anyone have the tubes at a bargain price? (he asked knowingly).


Terry Bowman, KA4HJH
"The Mac Doctor"

https://www.astarcloseup.com

"Every kid starts out as a natural-born scientist, and then we beat it out of them. A few trickle through the system with their wonder and enthusiasm for science intact."—Carl Sagan, Psychology Today, 1996

newxito

unread,
Jan 17, 2025, 5:42:02 AM1/17/25
to neonixie-l
Since std::float128_t is not yet implemented for the esp32, I have made an "experimental" version of the calculator firmware that uses arbitrary-precision arithmetic. 64-bit floating point arithmetic is probably ok for a retro style nixie calculator, but I prefer to have more precision. And maybe I could use scrolling to display more digits.

Anyway, I'm now starting to think about a RPN version of the IN-12 calculator. I know roughly how RPN works, but I've never used one and don't really know what I'm doing, so I made some assumptions:

Firmware:
RPN with 4 stack levels (X,Y,Z,T) + LAST X, 10 memories and scientific notation, not programmable

Keycap changes:
[=] -> [ENT] -> Enter
[MC] -> [CLX]  -> clear display (X)
[MR] -> [X<>Y] -> switch registers
[MS] -> [STO] -> store in memory
[M+] -> [RCL] -> recall from memory
[M-] -> [REG] -> clear memory and stack

I could use [C] and [AC] to add more functions...

Display changes for scientific notation:
Can be done just by replacing one IN-12 with another IN-15A for negative exponents

All this would be possible without any changes to the electronics or the case.
Am I missing something?

The current keyboard layout:
keyb.jpg

newxito

unread,
Jan 21, 2025, 5:17:23 PM1/21/25
to neonixie-l
I will start the RPN nixie calculator with this keyboard design. There is now one additional column. Please let me know if you see any errors or if I forgot something essential for a RPN calculator. The calculator will not be programable. I want to make my own thing and not a HP clone, that’s why I keep using some keys like C, AC or MC.
[AC] clears the stack, [MC] clears the memory, [C] clears the display (x register) and [←] clears the last digit entered. The rest should be straight forward.

RPN_keyboard.jpg

Reply all
Reply to author
Forward
0 new messages