A float literal beside a used decimal stays a float literal #625

Manually merged
binjovi-bot merged 2 commits from rpg-9-o-floattwin-20261023 into trunk 2026-10-23 23:19:24 +00:00
Owner

A float literal beside a used decimal stays a float literal

  • rpg_eval.zig (decimalTwin): a decimal constant with the digits of a
    float constant is the twin of a decimal literal only when no instruction
    names it. A named decimal (P2 = 2.5) is a literal of its own, so
    F = 2.5E0 * P keeps 2.5E0 and the float add stays a float add
    (LEMONADE statement 179: op 47, not 54).
  • Probe ftwin-float-beside-decimal (dictionary battery ftwin, case c):
    F = 2.5E0 * P; P2 = 2.5;.

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":0,"clean_delta":0,"base":209,"new":209},"twins":{"groups":426,"recovered":413,"regressions":[],"newly":1},"allgroups":{"regressions":[],"newly":[],"worse":[]},"full_check":{"exit":0,"seconds":824}}
# A float literal beside a used decimal stays a float literal - `rpg_eval.zig` (`decimalTwin`): a decimal constant with the digits of a float constant is the twin of a decimal literal only when no instruction names it. A named decimal (`P2 = 2.5`) is a literal of its own, so `F = 2.5E0 * P` keeps `2.5E0` and the float add stays a float add (LEMONADE statement 179: op 47, not 54). - Probe `ftwin-float-beside-decimal` (dictionary battery `ftwin`, case c): `F = 2.5E0 * P; P2 = 2.5;`. ## 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":0,"clean_delta":0,"base":209,"new":209},"twins":{"groups":426,"recovered":413,"regressions":[],"newly":1},"allgroups":{"regressions":[],"newly":[],"worse":[]},"full_check":{"exit":0,"seconds":824}} ```
binjovi-bot manually merged commit 67a82d9ee5 into trunk 2026-10-23 23:19:24 +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!625
No description provided.