Post Reply 
DB48X: HP48-like RPL implementation for DM42
10-03-2024, 01:17 AM (This post was last modified: 10-03-2024 01:20 AM by c3d.)
Post: #327
RE: DB48X: HP48-like RPL implementation for DM42
(10-02-2024 06:27 PM)grbrum Wrote:  Still whatever was wrong with my state file, it is still interesting that this error only happened with 1100 / 2.2

It actually happens if you manually enter 500.0 or 500. on the command line, i.e. the problem is with the value 500.

I found and fixed the problem. You correctly attributed it to the NoTrailingDecimal setting. The elimination of the trailing . was triggered, which caused it to, internally, write 500, suppressing the . because there were no non-zero digits left to display, then write 0000 to respect the FIX 4 setting.

If you select FIX 2, then you get 50000, and so on.

Note that the internal representation for variable-size decimals uses a dense binary-decimal encoding, where 10 bits store three decimal digits (values 0-999, the values 1000-1023 being "lost"). As a result, the problem does not occur for 50.0 or 5.0, you need at least 3 digits for it to actually trigger.

Quote:I also tried 1000/2.2 ; 900/2.2; 1200/2.2; 1100/2 and all return expected results.
only 1100/2.2 gave a weird display result.

It's because all these other values have trailing decimals, except the 1100/2 calculation, which was done using only integers. If you had typed 1100/2. or 1100./2, i.e. with a decimal separator on either side, you get the same problem with 5500000 being shown.

Quote:by means of elimination, the error is on the NoTrailingDecimal line.

You are entirely correct.

Thanks a lot for the report, this will be fixed in the next release.

DB48X,HP,me
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
DB48X v0.4.8 is out - c3d - 10-22-2023, 11:31 PM
Release v0.5.0: Statistics and flags - c3d - 11-20-2023, 08:57 AM
v0.6.5: Minor bug fixes - c3d - 02-11-2024, 11:23 PM
Release 0.7.1 "Whip" - Bug fixes - c3d - 03-04-2024, 12:46 AM
DB48X v0.7.4 release is out - c3d - 04-14-2024, 03:05 PM
DB48X v0.7.6: Solving menu - c3d - 05-13-2024, 12:04 AM
DB48X v0.7.7: Units in solver - c3d - 06-02-2024, 11:36 PM
v0.7.10 - Interactive stack - c3d - 07-14-2024, 11:31 PM
DB48X v0.7.13 is out - c3d - 08-05-2024, 07:31 AM
DB48X v0.7.15 - c3d - 08-25-2024, 08:45 PM
DB48X v0.7.16 - c3d - 09-02-2024, 01:36 AM
DOSUBS command - grbrum - 09-04-2024, 03:37 PM
v0.7.18 - APPLY, SUBST, WHERE - c3d - 09-15-2024, 11:58 PM
Program Editing Question - spiff72 - 09-16-2024, 03:27 PM
press 2 simultaneous buttons? - grbrum - 09-30-2024, 09:01 PM
RE: DB48X: HP48-like RPL implementation for DM42 - c3d - 10-03-2024 01:17 AM
CST Custom Menu - grbrum - 10-04-2024, 05:00 AM
v0.8.2: Assignments, Custom menu - c3d - 10-21-2024, 05:49 AM
CST - grbrum - 11-05-2024, 08:07 PM
Stuttgart video - c3d - 11-07-2024, 08:22 PM
Long Name Menus - usability - grbrum - 11-08-2024, 07:47 PM
Release v0.8.5: Keyboard fixes - c3d - 11-12-2024, 01:05 AM
CONVERT bug - grbrum - 11-12-2024, 07:44 PM



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