Post Reply 
The Rogue HP-12c
10-06-2024, 08:54 PM (This post was last modified: 10-06-2024 09:14 PM by dm319.)
Post: #42
RE: The Rogue HP-12c
Ok Albert has solved it. We think it is likely BCD.

I had been working on the principal that some 16 digit decimals are not representable by 64 bit binary, but I was struggling to find them. Albert pointed out to me that numbers just under 1e16 often shared binary representations. Here are representations from 1e16 down to 9999999999999990:

Code:
[1] 00 80 e0 37 79 c3 41 43
[1] 00 80 e0 37 79 c3 41 43
[1] ff 7f e0 37 79 c3 41 43
[1] fe 7f e0 37 79 c3 41 43
[1] fe 7f e0 37 79 c3 41 43
[1] fe 7f e0 37 79 c3 41 43
[1] fd 7f e0 37 79 c3 41 43
[1] fc 7f e0 37 79 c3 41 43
[1] fc 7f e0 37 79 c3 41 43
[1] fc 7f e0 37 79 c3 41 43
[1] fb 7f e0 37 79 c3 41 43

I think the representation is big-endian in this case, but you can see several values have the same encoding. Albert tells me that numbers between 2^53 and 1e16 must be an even integer! So:

1e16
3
-

should yield an odd number if BCD and even if binary. I was subtracting 1e16 afterwards to look at what number had been calculated, but sadly the 12c was returning 0. In fact it did it for 1e15 and 1e14 also, which suggests it has some funny rounding algorithm.

To prevent the 'flush-to-zero', Albert suggested:

1e16
999999
-
999999e10
-

which should have yielded:
9'999'000'001

but instead we got:
9'999'000'010

This is likely because

Code:
10'000'000'000'000'000
               999'999 -

is truncated to 16 digits:

Code:
10'000'000'000'000'00_
               999'99_ -

Using an example where we weren't pushing into 17 digits:

999999e10
999999
-
999998e10
-

Then we get:
9'999'000'001 rather than 9'999'000'000 as expected with binary.

Very much channelling Albert here - but it doesn't look like binary due to the above solution, and it looks like BCD as the truncation happened when aligning decimal digits - yielding the unexpected 10.

So there we have it. Looks like BCD, but doing some weird rounding stuff also.

EDIT: Type 2^52 -> 2^53. And clarification of why it is BCD.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
The Rogue HP-12c - dm319 - 09-11-2024, 12:52 PM
RE: The Rogue HP-12c - AnnoyedOne - 09-11-2024, 12:58 PM
RE: The Rogue HP-12c - dm319 - 09-11-2024, 07:28 PM
RE: The Rogue HP-12c - AnnoyedOne - 09-11-2024, 07:40 PM
RE: The Rogue HP-12c - dm319 - 09-11-2024, 08:50 PM
RE: The Rogue HP-12c - HPing - 09-11-2024, 03:57 PM
RE: The Rogue HP-12c - dm319 - 09-11-2024, 07:34 PM
RE: The Rogue HP-12c - brouhaha - 09-12-2024, 12:13 AM
RE: The Rogue HP-12c - dm319 - 09-12-2024, 09:26 AM
RE: The Rogue HP-12c - Steve Simpkin - 09-12-2024, 12:05 PM
RE: The Rogue HP-12c - AnnoyedOne - 09-12-2024, 01:50 PM
RE: The Rogue HP-12c - cheesy - 09-12-2024, 03:00 PM
RE: The Rogue HP-12c - AnnoyedOne - 09-12-2024, 03:06 PM
RE: The Rogue HP-12c - dm319 - 09-12-2024, 10:06 PM
RE: The Rogue HP-12c - AnnoyedOne - 09-13-2024, 12:16 PM
RE: The Rogue HP-12c - AnnoyedOne - 09-13-2024, 03:01 PM
RE: The Rogue HP-12c - dm319 - 09-12-2024, 10:12 PM
RE: The Rogue HP-12c - dm319 - 09-13-2024, 06:00 PM
RE: The Rogue HP-12c - AnnoyedOne - 09-13-2024, 06:13 PM
RE: The Rogue HP-12c - dm319 - 09-13-2024, 09:30 PM
RE: The Rogue HP-12c - AnnoyedOne - 09-14-2024, 12:26 PM
RE: The Rogue HP-12c - dm319 - 09-14-2024, 01:01 PM
RE: The Rogue HP-12c - Surfin - 10-04-2024, 09:31 PM
RE: The Rogue HP-12c - AnnoyedOne - 10-05-2024, 01:15 PM
RE: The Rogue HP-12c - dm319 - 09-15-2024, 02:54 PM
RE: The Rogue HP-12c - AnnoyedOne - 09-15-2024, 03:23 PM
RE: The Rogue HP-12c - dm319 - 09-15-2024, 03:41 PM
RE: The Rogue HP-12c - AnnoyedOne - 09-15-2024, 03:51 PM
RE: The Rogue HP-12c - Divasson - 10-05-2024, 01:42 PM
RE: The Rogue HP-12c - Surfin - 10-05-2024, 03:12 PM
RE: The Rogue HP-12c - Surfin - 10-05-2024, 05:29 PM
RE: The Rogue HP-12c - AnnoyedOne - 10-06-2024, 11:42 AM
RE: The Rogue HP-12c - Surfin - 10-05-2024, 05:55 PM
RE: The Rogue HP-12c - dm319 - 10-05-2024, 10:52 PM
RE: The Rogue HP-12c - Surfin - 10-05-2024, 11:40 PM
RE: The Rogue HP-12c - AnnoyedOne - 10-06-2024, 02:22 PM
RE: The Rogue HP-12c - AnnoyedOne - 10-06-2024, 02:50 PM
RE: The Rogue HP-12c - dm319 - 10-06-2024, 06:35 PM
RE: The Rogue HP-12c - AnnoyedOne - 10-06-2024, 06:49 PM
RE: The Rogue HP-12c - dm319 - 10-06-2024, 07:07 PM
RE: The Rogue HP-12c - AnnoyedOne - 10-06-2024, 07:30 PM
RE: The Rogue HP-12c - dm319 - 10-06-2024 08:54 PM
RE: The Rogue HP-12c - AnnoyedOne - 10-06-2024, 09:10 PM
RE: The Rogue HP-12c - dm319 - 10-06-2024, 09:24 PM
RE: The Rogue HP-12c - dm319 - 10-06-2024, 09:02 PM
RE: The Rogue HP-12c - Surfin - 10-06-2024, 09:36 PM
RE: The Rogue HP-12c - dm319 - 10-06-2024, 09:47 PM
RE: The Rogue HP-12c - AnnoyedOne - 10-07-2024, 12:40 PM
RE: The Rogue HP-12c - dm319 - 10-07-2024, 09:54 PM
RE: The Rogue HP-12c - JanS - 10-07-2024, 07:35 AM
RE: The Rogue HP-12c - AnnoyedOne - 10-07-2024, 12:57 PM
RE: The Rogue HP-12c - Surfin - 10-07-2024, 05:14 PM
RE: The Rogue HP-12c - AnnoyedOne - 10-07-2024, 05:18 PM
RE: The Rogue HP-12c - dm319 - 10-07-2024, 09:23 PM
RE: The Rogue HP-12c - AnnoyedOne - 10-08-2024, 08:08 AM
RE: The Rogue HP-12c - jklsadf - 10-08-2024, 08:53 AM
RE: The Rogue HP-12c - AnnoyedOne - 10-08-2024, 12:30 PM
RE: The Rogue HP-12c - dm319 - 10-08-2024, 12:50 PM
RE: The Rogue HP-12c - AnnoyedOne - 10-08-2024, 12:56 PM
RE: The Rogue HP-12c - Surfin - 10-08-2024, 08:29 PM
RE: The Rogue HP-12c - dm319 - 10-08-2024, 09:11 PM
RE: The Rogue HP-12c - AnnoyedOne - 10-09-2024, 10:20 AM
RE: The Rogue HP-12c - dm319 - 10-10-2024, 06:58 PM
RE: The Rogue HP-12c - Idnarn - 10-11-2024, 03:54 PM
RE: The Rogue HP-12c - AnnoyedOne - 10-11-2024, 04:17 PM
RE: The Rogue HP-12c - Idnarn - 10-11-2024, 04:23 PM
RE: The Rogue HP-12c - Surfin - 10-11-2024, 04:36 PM
RE: The Rogue HP-12c - Idnarn - 10-11-2024, 04:44 PM
RE: The Rogue HP-12c - Surfin - 10-11-2024, 05:29 PM
RE: The Rogue HP-12c - AnnoyedOne - 10-11-2024, 05:43 PM
RE: The Rogue HP-12c - Surfin - 10-11-2024, 06:56 PM
RE: The Rogue HP-12c - AnnoyedOne - 10-11-2024, 07:04 PM
RE: The Rogue HP-12c - dm319 - 10-13-2024, 09:34 PM
RE: The Rogue HP-12c - AnnoyedOne - 10-14-2024, 01:29 AM
RE: The Rogue HP-12c - lvt - 10-19-2024, 05:48 AM
RE: The Rogue HP-12c - Idnarn - 10-11-2024, 04:37 PM
RE: The Rogue HP-12c - AnnoyedOne - 10-11-2024, 04:46 PM
RE: The Rogue HP-12c - Idnarn - 10-11-2024, 04:59 PM
RE: The Rogue HP-12c - RPNerd - 10-12-2024, 07:20 AM
RE: The Rogue HP-12c - AnnoyedOne - 10-08-2024, 01:09 PM
RE: The Rogue HP-12c - AnnoyedOne - 10-07-2024, 02:30 PM
RE: The Rogue HP-12c - Stephan61 - 10-07-2024, 07:58 AM
RE: The Rogue HP-12c - AnnoyedOne - 10-07-2024, 12:38 PM
RE: The Rogue HP-12c - AnnoyedOne - 10-08-2024, 02:01 PM
RE: The Rogue HP-12c - dm319 - 10-08-2024, 05:40 PM
RE: The Rogue HP-12c - AnnoyedOne - 10-08-2024, 05:53 PM
RE: The Rogue HP-12c - cheesy - 10-12-2024, 04:02 AM
RE: The Rogue HP-12c - AnnoyedOne - 10-12-2024, 12:42 PM
RE: The Rogue HP-12c - cheesy - 10-12-2024, 01:24 PM
RE: The Rogue HP-12c - AnnoyedOne - 10-12-2024, 01:37 PM
RE: The Rogue HP-12c - Idnarn - 11-16-2024, 01:12 PM
RE: The Rogue HP-12c - Idnarn - 11-16-2024, 02:10 PM
RE: The Rogue HP-12c - Albert Chan - 11-17-2024, 05:04 PM
RE: The Rogue HP-12c - dm319 - 11-17-2024, 09:52 AM
RE: The Rogue HP-12c - dm319 - 11-17-2024, 10:07 AM
RE: The Rogue HP-12c - lvt - 11-19-2024, 04:57 AM
RE: The Rogue HP-12c - RPNerd - 11-19-2024, 06:31 AM
RE: The Rogue HP-12c - lvt - 11-19-2024, 07:51 AM
RE: The Rogue HP-12c - lvt - 11-19-2024, 07:56 AM



User(s) browsing this thread: 2 Guest(s)