A decimal twin keeps its trailing zeros #629

Manually merged
binjovi-bot merged 1 commit from rpg-9-s-twin-zeros-20261024 into trunk 2026-10-24 12:20:31 +00:00
Owner

A decimal twin keeps its trailing zeros

A decimal literal in a float expression leaves a decimal constant beside the
float constant (the twin). The twin has the digits of the literal as written:
0.50 is 50, 3.0 is 30. The rebuild looked for the twin by the shortest
digits of the float (5, 3), found none, and wrote a float literal (0.5E0).
That literal compiles to a float constant without a twin, so the constant pool
of the rebuilt program differed. The rebuild now takes a twin whose digits have
trailing zeros and writes the literal with the same decimal positions
(A + 0.50, A / 3.0 + 2.50). The ftwin2-g6 and ftwin2-g7 probes are the
public reproduction.

Gates

{"checks":{"net_statements":0},"census":{"statuses":{"recovered":645,"partial":0,"unresolved":0},"regressions":0,"newly_recovered":0},"golden":"golden 173/5/0 == dump 173/5/0","emit":{"worse":[],"better":0,"newly_clean":2,"clean_delta":2,"base":215,"new":217},"twins":{"groups":432,"recovered":417,"regressions":[],"newly":2},"allgroups":{"regressions":[],"newly":[],"worse":[]},"full_check":{"exit":0,"seconds":965}}
# A decimal twin keeps its trailing zeros A decimal literal in a float expression leaves a decimal constant beside the float constant (the twin). The twin has the digits of the literal as written: `0.50` is `50`, `3.0` is `30`. The rebuild looked for the twin by the shortest digits of the float (`5`, `3`), found none, and wrote a float literal (`0.5E0`). That literal compiles to a float constant without a twin, so the constant pool of the rebuilt program differed. The rebuild now takes a twin whose digits have trailing zeros and writes the literal with the same decimal positions (`A + 0.50`, `A / 3.0 + 2.50`). The `ftwin2-g6` and `ftwin2-g7` probes are the public reproduction. ## Gates ``` {"checks":{"net_statements":0},"census":{"statuses":{"recovered":645,"partial":0,"unresolved":0},"regressions":0,"newly_recovered":0},"golden":"golden 173/5/0 == dump 173/5/0","emit":{"worse":[],"better":0,"newly_clean":2,"clean_delta":2,"base":215,"new":217},"twins":{"groups":432,"recovered":417,"regressions":[],"newly":2},"allgroups":{"regressions":[],"newly":[],"worse":[]},"full_check":{"exit":0,"seconds":965}} ```
Write the decimal twin of a float with its trailing zeros
All checks were successful
binjovi/ci Binjovi completed the frozen plan
40dd44c27e
binjovi-bot manually merged commit 40dd44c27e into trunk 2026-10-24 12:20:31 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
sean/sourcerer!629
No description provided.