HP Forums
The HP-12c and platinum Kinpo story - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: The HP-12c and platinum Kinpo story (/thread-22795.html)



The HP-12c and platinum Kinpo story - dm319 - 12-01-2024 08:57 PM

I started writing out a longish reply to this thread and realised it was best put into another post. I know we've heard the story many times that the 12c platinum is a rewrite-from-scratch, and I've seem people advise caution about buying the 12c platinum for exams where the exact answer is important. However, my TVM testing found something different. This was original reply:

(12-01-2024 01:50 PM)Steve Simpkin Wrote:  Perhaps. According to Wikipedia, the HP-12C Platinum is a complete reimagination of the HP-12C that was manufactured by Kinpo Electronics for HP. Unlike the HP-12C which, (more or less) run the same 1981 firmware on a real or emulated HP "NUT" processor, the HP-12C Platinum has completely rewritten software running on a 6502 processor core.,
https://en.wikipedia.org/wiki/HP-12C#HP_12c_Platinum_/_Prestige
...
Additional information:
...
https://www.hpcc.org/datafile/V22N3/platinum.pdf

(Apologies to those who've heard me say this already)

The forensic testing I did on TVM suggested to me that the software running on my 12c platinum did not come from a clean slate. Most of it is identical to Saturn-and-beyond era HP financial calculators, returning 12 digits, with presumably a 15 digit internal precision. I suspect it is running some of the same C code as those devices. However, there are two slight differences - one is that, unlike the Saturn TVM solvers, but like the 12c, it takes the ceiling of solve-for-N. Another difference is the solve-for-i behaves more like the regular 12c.

The article above is interesting, and I wonder whether the first device had these bugs, but they got fixed maybe? My device doesn't behave like described.

from the article Wrote:. For example, f CLEAR-FIN n=10 PV=100 PMT=-20, and
solve for i: it takes 15 seconds on the 12C and 40 seconds on the 12CP, but re-
solving for i only takes 4 seconds on the 12C since the existing i is used as an
initial guess; on the 12CP, it still takes 40 seconds, which implies that the solver
cannot take user-supplied initial guesses any more. This example is also useful to
show the occasional discrepancies in the results: solving for FV and setting the
display format to scientific notation (f ยท) reveals a difference of 0.44%.

This takes 2 seconds on my 12c platinum and returns 15.09841448 compared to 15.09841448 on my 12c emulator.

While the platinum shows 10 digits, you can expose the 12 digit precision by subtracting what is visible, which shows that the actual result is 15.0984144771.

Just for fun I tried this on the rogue 12c. It returned 15.09841448 also. Using subtraction we can find the full result which is 15.09841447711221.

This isn't really a forensic test, because it should be a fairly easy solve-for-i, but none the less, the 12c platinum returns the same result to 10 digits as the 12c, but also returns another two digits. The rogue 12c returns an extra 6 digits over the 12c.

More digits can be nice, but only if they are good quality ones. Which one is the most accurate? Calculating a reference value in R, I could generate these accuracy measurements:

Code:
|calculator             | 1046_12cp|
|:----------------------|---------:|
|HP-12c                 |      8.54|
|HP-12c Platinum        |     10.90|
|HP-12c Rogue One       |     12.45|

The 12c platinum scores nearly 2 points more than the 12c, which means it does make good use of those two extra digits, in fact those 2 extra digits are correct. The Rogue 12c is more accurate, though not 6 digits more accurate.

And so the conclusion to this exercise is that the most accurate HP TVM solver for this question is, bizarrely, a device currently being pulled from the shelves, and the next most accurate is the 12c platinum, which is often derided for 'having different algorithms' to the regular 12c.

This solve-for-i isn't really a forensic test, but those tests do place the 12c platinum as some kind of meld of saturn financials and the old 12c.

The story of Kinpo completely reimplementing the 12c from scratch using a scanned user manual would fit more with the Rogue 12c IMO.

If anyone would like more information on why I think the 12c platinum is mostly a Saturn-era financial calculator, I can try to demonstrate why I think that (I hearing screaming into the distance of 'no please, not that again!').


RE: The HP-12c and platinum Kinpo story - AnnoyedOne - Yesterday 12:58 PM

There are at least two versions of firmware for the 12CP, v1 and v2. The initial (silver) ones had v1 in them. I don't know if v2 fixed any bugs.

Both use the Generalplus (was Sunplus?) GPL31A SoC which is a masked-ROM part. The firmware is therefore not updateble.

The rogue HP-12C likely uses the newer Generalplus GPL833F which is flashable but has no USB controller so it looks like it requires a custom programmer for firmware updates.

https://www.hpmuseum.org/forum/thread-22313-post-192959.html#pid192959

Whether Kinpo designed the 12CP hardware and firmware I'm not sure. I've seen statements claiming that they did and others saying that it was HP. As for the "rogue" that is also unknown. We may never know for sure.

Interestingly the GPL31A went end-of-life over a year ago so it is quite possible that the GPL833F is being used as a replacement. Both use a 6502 CPU core. The latter is 2x as fast though (if so programmed).

All of this is in contrast to the current HP-12C. That uses a Atmel (now Microchip?) ATSAM4LC2CA SoC. It emulates the original (1981) HP-12C firmware and thus acts the same. The firmware is end-user updateble (via USB) just like the HP-15C CE (which uses the same hardware).

None of this likely matters to most end-users (financial professionals mostly I'd guess) and both the 12C and 12CP have changed hardware and/or firmware over the years. It remains to be seen what the future is for both.

A1

PS Will the current 12C+, "Gold", or whatever you want to call it ever get VoyagerSave functionality like the HP-15C CE? Maybe. Maybe not. HP-15C LE owners never got a final bug fix firmware release so the history isn't promising.


RE: The HP-12c and platinum Kinpo story - dm319 - Yesterday 07:16 PM

Thanks A1, great summary of the hardware!

That ARM processor seems remarkably powerful. I wonder how much more powerful it is compared to by first desktop computer. 48Mhz vs 14Mhz for starters!


RE: The HP-12c and platinum Kinpo story - AnnoyedOne - Yesterday 07:21 PM

(Yesterday 07:16 PM)dm319 Wrote:  I wonder how much more powerful it is compared to by first desktop computer...

I think that the first IBM PC used a ("16-bit") Intel 8088 clocked at 4.77MHz. As slow as a wet week. Smile

https://en.wikipedia.org/wiki/History_of_personal_computers#The_IBM_PC

FYI the 6502 is 8-bit and ARM's 32-bit.

A1


RE: The HP-12c and platinum Kinpo story - dm319 - Yesterday 08:15 PM

It seems strange to me that we're still making modern equipment that runs on such an old 8 bit design. My first desktop ran a 68020, which I think must be somewhere closer to the 6502 than the ARM. A lot of the TIs seemed to run on Z80, and their CAS ones ran on 68000. I like that they are still in use.


RE: The HP-12c and platinum Kinpo story - Eric Rechlin - Yesterday 09:10 PM

(12-01-2024 08:57 PM)dm319 Wrote:  The forensic testing I did on TVM suggested to me that the software running on my 12c platinum did not come from a clean slate. Most of it is identical to Saturn-and-beyond era HP financial calculators, returning 12 digits, with presumably a 15 digit internal precision. I suspect it is running some of the same C code as those devices.

The Saturn-based financial calculators (10B, 14B, 17B/17BII, 18C/19B/19BII) were not coded in C. They were written in a mix of Saturn assembly and RPL.

I believe the post-Saturn HP ones (20b/30b and 10bII+) were indeed written in C (or C++, I'm not sure), however. For the non-HP ones (10BII/10bII, 12c Platinum/Prestige, 17bII+) the code was written outside HP so implementation details are anybody's guess. Yes, the 10BII and 10bII were different (but similar) calculators -- and totally different from the 10bII+.

Perhaps some similarities between the 12c Platinum and the Saturn machines were more due to the greater number of internal digits compared to the 12C rather than shared code.


RE: The HP-12c and platinum Kinpo story - dm319 - Yesterday 10:33 PM

(Yesterday 09:10 PM)Eric Rechlin Wrote:  The Saturn-based financial calculators (10B, 14B, 17B/17BII, 18C/19B/19BII) were not coded in C. They were written in a mix of Saturn assembly and RPL.

Ah yes, good point, was thinking of a post which I probably can't lay my hand on now that the Saturn code was written in C for the later calculators, probably up to the Prime (for TVM at least).

(Yesterday 09:10 PM)Eric Rechlin Wrote:  Perhaps some similarities between the 12c Platinum and the Saturn machines were more due to the greater number of internal digits compared to the 12C rather than shared code.

Maybe.. The HP-12c platinum is reported to have 15 digit internal precision and displays up to 12, which is quite a specific set up and suggests it uses the same underlying calculator platform as the Saturns. Could it use different algorithms? Maybe, but arguably odd to use the same code for the calculator platform but not use the TVM code.

I'll have a dig around in my results and come back with my most convincing argument. Maybe after I've done that exercise I might have changed my mind...!


RE: The HP-12c and platinum Kinpo story - Steve Simpkin - Yesterday 11:02 PM

(Yesterday 10:33 PM)dm319 Wrote:  
(Yesterday 09:10 PM)Eric Rechlin Wrote:  The Saturn-based financial calculators (10B, 14B, 17B/17BII, 18C/19B/19BII) were not coded in C. They were written in a mix of Saturn assembly and RPL.

Ah yes, good point, was thinking of a post which I probably can't lay my hand on now that the Saturn code was written in C for the later calculators, probably up to the Prime (for TVM at least).

(Yesterday 09:10 PM)Eric Rechlin Wrote:  Perhaps some similarities between the 12c Platinum and the Saturn machines were more due to the greater number of internal digits compared to the 12C rather than shared code.

Maybe.. The HP-12c platinum is reported to have 15 digit internal precision and displays up to 12, which is quite a specific set up and suggests it uses the same underlying calculator platform as the Saturns. Could it use different algorithms? Maybe, but arguably odd to use the same code for the calculator platform but not use the TVM code.

I'll have a dig around in my results and come back with my most convincing argument. Maybe after I've done that exercise I might have changed my mind...!

Yes, I recall Cyrille mentioning that they had re-implemented the Saturn math routines into a C library for the later calculators. Here are a couple of posts that mentions that in passing.
https://www.hpmuseum.org/forum/thread-2583-post-22843.html#pid22843

https://www.hpmuseum.org/forum/thread-14061-post-124770.html#pid124770

Edit: Link to additional post added.


RE: The HP-12c and platinum Kinpo story - AnnoyedOne - Today 01:28 PM

(Yesterday 08:15 PM)dm319 Wrote:  It seems strange to me that we're still making modern equipment that runs on such an old 8 bit design.

I know I've said this before. Cost, cost, cost.

Simpler 8-bit CPUs means less silicon means lower cost. That's why many put 8-bit 8051/6502 CPU's in "modern" SoCs. Increase the clock speed, up the memory, and "Bob's your aunty" Smile Many Microchip PICs fall into the same category IMHO.

By contrast ARMs are a 32-bit architecture. Some variants use the reduced-cost "THUMB" instruction set which is a 16/32-bit hybrid as I recall. FYI ARM (a UK company) sells CPU designs and not chips. Chip manufacturers purchase designs from ARM, put stuff around them, and sell those (SoC = System on Chip). So "ARM" is a CPU architecture not a specific chip.

The 68020 is a true 32-bit CPU made by Motorola (now Freescale). Probably a bit slower than newer ARM based designs but comparable.

The Zilog Z80 is a 8-bit CPU. A super Intel 8080 in effect. I'm not a fan but again it is cheap. I've written a lot of Z80 assembler and some PASCAL code (but not cross-compiled 'C').

The 68000 is 32-bit internally with a 16-bit data and 24-bit address bus. I've written assembler and 'C' code for a 68000 system (on a Motorola multi-user 68010 VMEbus based computer).

Insofar as calculators go the end-user probably doesn't care much. Sure an ARM-based HP-12C+ is faster than a 6502-based HP-12C Platinum but who cares? Since you're often selling them in large quantities every penny saved counts. Ask any accountant (who, ironically, probably uses a 12C to count those "beans").

The general "rule" in engineering is that you can build something fast/cheap/good. Pick two Big Grin

A1


RE: The HP-12c and platinum Kinpo story - Commie - Today 03:47 PM

Hi,

Just had a quick wizz through the eZ80 data sheet, wow what a processor, the 8051/pics and avr are just toys compared to the eZ80, it supports 50 mips, 24 bit address space (16Mbytes) comes ready to use 64kbyte flash 8kbyte ram (model dependant), probably the most powerful 8-bit micro available right now and I much prefer Von Neumann architecture over Harvard.

The eZ80 is currently powering the ti-84+ce calculator with about 150Kbytes of user ram.

Never seen a compiler for it? perhaps Zilog offer one at great cost, obviously only large conglomerates can afford to use it, like TI.


RE: The HP-12c and platinum Kinpo story - dm319 - Today 10:00 PM

(Yesterday 09:10 PM)Eric Rechlin Wrote:  Perhaps some similarities between the 12c Platinum and the Saturn machines were more due to the greater number of internal digits compared to the 12C rather than shared code.

OK I said I would come back to this, and maybe after
carefully looking through the results, my confidence might
be slightly less, though I'm still suspicious (of the
general hypothesis that 12c platinum and saturn+ machines
share code).

The Saturn+ machines (HP-10bII+, HP-17B, HP-17BII, HP17BII+
mk1 and mk2, HP-19BII, HP-27S, HP-20b, HP-30b, HP-50G, HP
Prime) essentially return identical results and I feel
confident saying they likely run the same software.

Previously I had pointed out problem 4 as evidence for the
HP-12cp and saturn+ similarities, but this was somewhat
disproven by Albert, who pointed out that it was correct
given the accuracy of representing the PMT (see
this
thread):

Code:
| calculator                  | 3                                    | 4                                       |
|-----------------------------|--------------------------------------|-----------------------------------------|
| Sharp EL-735                | 331559.3833                          | 0                                       |
| Sharp PC-1403H HPF 188177   | 331667.0067                          | 0                                       |
| Sharp PC-1421               | 331559.3833                          | ERR                                     |
| Victor V12                  | 331667.0067                          | ERR                                     |
| TI BA II Plus Professional  | 331667.0067                          | -6.652807e-14                           |
| HP-12c                      | 331667.0067                          | -7.983367984e-10                        |
| HP-12c Platinum             | 331667.006691                        | -7.98336798336e-12                      |
| HP-10bII+                   | 331667.006691                        | -7.98336798336e-12                      |
| HP-17B                      | 331667.006691                        | -7.98336798336e-12                      |
| HP-17BII                    | 331667.006691                        | -7.98336798336e-12                      |
| HP-17BII+ mk1               | NA                                   | -7.98336798336e-12                      |
| HP-17BII+ mk2               | 331667.006691                        | -7.98336798336e-12                      |
| HP-19BII                    | NA                                   | -7.98336798336e-12                      |
| HP-27S                      | 331667.006691                        | -7.98336798336e-12                      |
| HP-20b                      | 331667.006691                        | -7.98336798336e-12                      |
| HP-30b                      | 331667.006691                        | -7.98336798336e-12                      |
| HP-50G                      | 331667.006691                        | -7.98336798336e-12                      |
| HP Prime 2.1.14730          | 331667.006691                        | -7.98336798336e-12                      |
| Casio FC-200                | 331667.0067                          | -8.316008316e-13                        |
| Casio FC-100V               | 331667.006690768                     | ERR                                     |
| Casio FC-200V               | 331667.006690768                     | ERR                                     |
| Busicom FN200               | 331732.5479008                       | ERR                                     |
| Busicom FN400               | 331667.0066903                       | ERR                                     |
| Ref                         | 331667.00669077689178034190843596256 | 0                                       |

But some potential 'forensic' markers could be problem 8:
N = 32, PV = -999'999, PMT = 0, FV = 1e6, P/YR = 1, calculate i (end mode)

My reference result is 3.125001611329216004244745444268174e-6

Code:

| calculator                          | 7                                        | 8                                      |
|-------------------------------------|------------------------------------------|----------------------------------------|
| HP-92                               | 0                                        | 3.125e-6                               |
| HP-37E                              | 0                                        | 3.125e-6                               |
| HP-38E                              | 0                                        | 3.125e-6                               |
| HP-12c                              | 2.181818182e-10                          | 3.125004736e-6                         |
| HP-12c Platinum                     | 2.18181818182e-10                        | 3.125001e-6                            |
| HP-12c Rogue One                    | ERR                                      | 3.125001e-6                            |
| HP-10bII+                           | 2.16e-10                                 | 3.125001e-6                            |
| HP-17B                              | 2.16987100416e-10                        | 3.125001e-6                            |
| HP-17BII                            | 2.16e-10                                 | 3.125001e-6                            |
| HP-17BII+ mk1                       | 2.16e-10                                 | 3.125001e-6                            |
| HP-17BII+ mk2                       | 2.16e-10                                 | 3.125001e-6                            |
| HP-19BII                            | 2.16e-10                                 | 3.125001e-6                            |
| HP-27S                              |                                          | 3.125001e-6                            |
| HP-20b                              | 2.16e-10                                 | 3.125001e-6                            |
| HP-30b                              | 2.16e-10                                 | 3.125001e-6                            |
| HP-50G                              | 2.16278831114e-10                        | 3.125001e-6                            |
| HP Prime 2.1.14730                  | 2.16e-10                                 | 3.125001e-6                            |
| Casio FC-200                        | 2.181818182e-10                          | 3.125e-6                               |
| Sharp EL-735                        | 0                                        | 3.124e-06                              |
| Sharp PC-1403H HPF 188177           | 0                                        | 3.12500161e-06                         |
| Sharp PC-1421                       | 0                                        | 3.124e-06                              |
| Victor V12                          | ERR                                      | 3.1250016e-6                           |
| BWK Business                        | 0                                        | 3.1250015e-6                           |
| Busicom FN200                       | ERR                                      | 3.125e-6                               |
| Busicom FN400                       | 0                                        | 3.125001611324e-6                      |
| RPN83P v0.9.0                       | 2.2191952055123e-10                      | 3.1250015273452e-6                     |
| RPN83P v0.12.0 RC2                  | 2.1818181818159e-10                      | 3.1250015273454e-6                     |
| RPN83P v0.12.0                      | 2.1818181818159e-10                      | 3.1250015273453e-6                     |
| RPN83P v1.0.0                       | 2.1818181818159e-10                      | 3.1250016113285e-6                     |
| TI-83 Plus                          | 2.181818181858e-10                       | 3.125001611329e-6                      |
| TI BA II Plus Professional          | 2.181818e-10                             | 3.125e-06                              |
| Casio FC-100V                       | ERR                                      | 3.125001e-6                            |
| Casio FC-200V                       | ERR                                      | 3.125001e-6                            |
| LibreOffice Calc 25.2.5.2           | -1.78732324199982e-9                     | 3.12500160353871e-6                    |
| Microsoft Excel 2408                | -2.86173808630135e-8                     | 3.12500160550423e-6                    |
| HP-67 Standard Pac                  | 0                                        | 3.1e-6                                 |

The saturn+ returned 3.125001e-6, and so did the platinum.
On the other hand, so did the rogue 12c, and the Casio
FC-100V and FC-200V. So, again not specific for the
platinum and saturns, and also it is a solve-for-i, so doesn't
fit with my theory.

Puzzle 12 returns -1001.6 for the saturn+ and platinum, and
none other of the calculators. However, -1001.6 is the
correct answer if you calculate the interest rate as
0.80000000001, 12 decimal places. However, still interesting
that it has returned this value to 5 digits, maybe?

Code:

| calculator                  | 11                                     | 12                                   |
|-----------------------------|----------------------------------------|--------------------------------------|
| HP-12c                      | 0.1666898147                           | -900                                 |
| HP-12c Platinum             | 0.166666666656                         | -1001.6                              |
| HP-12c Rogue One            | ERR                                    | ERR                                  |
| HP-17B                      | 0.166666666654                         | -1001.6                              |
| HP-17BII+ mk1               | 0.166666666654                         | -1001.6                              |
| HP-17BII+ mk2               | 0.166666666654                         | -1001.6                              |
| HP-27S                      | 0.166666666654                         | -1001.6                              |
| HP-20b                      | 0.166666666653                         | -1001.6                              |
| HP-30b                      | 0.166666666653                         | -1001.6                              |
| HP Prime 2.1.14730          | 0.166666666654                         | -1001.6                              |
| RPN83P v0.9.0               | 0.16666666666479                       | -986                                 |
| RPN83P v0.12.0 RC2          | 0.16666666665958                       | -987                                 |
| RPN83P v0.12.0              | 0.16666666666479                       | -986                                 |
| RPN83P v1.0.0               | 0.16666666666479                       | -986                                 |
| TI-83 Plus                  | 0.16666666665001                       | -900                                 |
| NSTK TVM V8                 | 0.166666666666666666666666666624694    | -1000                                |
| TI BA II Plus Professional  | 0.166666667                            | -999.54                              |
| Sharp EL-735                | 0.104784254                            | -975.1051597                         |
| Sharp PC-1403H HPF 188177   | 0.1666673857                           | -900                                 |
| Sharp PC-1421               | 1.073741824e9                          | -975.1051597                         |
| Ref                         | 0.166666666666666666666666666666666667 | -1000                                |
| BWK Business                | ERR                                    | -999.35950000                        |
| Victor V12                  | ERR                                    | -900                                 |
| Casio FC-100V               | 0.1666661832                           | -1000.0028450724                     |
| Casio FC-200V               | 0.1666661832                           | -1000.0028450724                     |
| LibreOffice Calc 25.2.5.2   | ERR                                    | -1000                                |
| Microsoft Excel 2408        | ERR                                    | ERR                                  |
| Busicom FN400               | 0.1666666665168                        | -1000                                |
| Busicom FN200               | ERR                                    | -1001.58                             |
| HP-67 Standard Pac          | -2.096903649e-5                        | -16611937.62                         |

So in summary, I am less confident about my claim that the
HP-12c platinum is running some of the TVM code seen in the
Saturn+ calculators. There are some particular differences,
especially in the solve-for-i algorithm, which is not the
same as on the Saturns, which we knew about. Otherwise it
is very similar, but Eric, you might well be right, that
this could well be more a feature of the 15/12 digit
accuracy. However, it's interesting that the HP-12c
platinum _does_ have a 15/12 calculator platform, but agree
I can't say I've convinced myself of TVM code sharing with
the Saturns.

On the otherhand, overall, there are lots of similarities,
like the failure on puzzle 5 and 6, and the overall
implementation is very good (the best HP TVM solver
overall?), like the HP-12c.

Curious!