Float arithmetic: literals, grouping and %FLOAT #624

Manually merged
binjovi-bot merged 3 commits from rpg-9-n-floatexpr-20261023 into trunk 2026-10-23 20:00:06 +00:00
Owner

Float arithmetic: literals, grouping and %FLOAT

  • rpg_eval.zig: a float constant whose digits no decimal constant of the
    module repeats shows as a float literal (2.5E0): a decimal literal
    keeps a decimal twin beside the float, a float literal has none. The
    emitter reads 2.5E0 (rpg_source.zig), and %FLOAT is a source word.
    A comparison keeps the plain text.
  • rpg_eval.zig (binary): arithmetic keeps its grouping: (a - b) / c
    and a - (b - c) take parentheses where the operator binds less.
  • rpg_eval.zig: an operand converted to float before the other one is
    loaded (29 P; 91 8 0; 27 K; 5), or after 75 8; 80 8, is an explicit
    %FLOAT; two implicit conversions under a float operation are a
    %FLOAT of the operation (%float(i - p)).
  • Probes h-flt6, h-evr (dictionary flt3 to flt6, evr). LEMONADE
    read-down: statement 177 no longer differs (179 still does: one float
    literal of it still has a twin).

Gates

{"checks":{"net_statements":0},"census":{"statuses":{"recovered":645,"partial":0,"unresolved":0},"regressions":0,"newly_recovered":0},"emit":{"worse":[],"better":1,"newly_clean":3,"clean_delta":3,"base":206,"new":209},"twins":{"groups":425,"recovered":412,"regressions":[],"newly":2},"allgroups":{"regressions":[],"newly":["savf/SC-ILE/EXPERIMENTS/h-flt2/stripped/object.savf 1"],"worse":[]},"full_check":{"exit":0,"seconds":631}}
# Float arithmetic: literals, grouping and %FLOAT - `rpg_eval.zig`: a float constant whose digits no decimal constant of the module repeats shows as a float literal (`2.5E0`): a decimal literal keeps a decimal twin beside the float, a float literal has none. The emitter reads `2.5E0` (`rpg_source.zig`), and `%FLOAT` is a source word. A comparison keeps the plain text. - `rpg_eval.zig` (`binary`): arithmetic keeps its grouping: `(a - b) / c` and `a - (b - c)` take parentheses where the operator binds less. - `rpg_eval.zig`: an operand converted to float before the other one is loaded (`29 P; 91 8 0; 27 K; 5`), or after `75 8; 80 8`, is an explicit `%FLOAT`; two implicit conversions under a float operation are a `%FLOAT` of the operation (`%float(i - p)`). - Probes `h-flt6`, `h-evr` (dictionary flt3 to flt6, evr). LEMONADE read-down: statement 177 no longer differs (179 still does: one float literal of it still has a twin). ## Gates ``` {"checks":{"net_statements":0},"census":{"statuses":{"recovered":645,"partial":0,"unresolved":0},"regressions":0,"newly_recovered":0},"emit":{"worse":[],"better":1,"newly_clean":3,"clean_delta":3,"base":206,"new":209},"twins":{"groups":425,"recovered":412,"regressions":[],"newly":2},"allgroups":{"regressions":[],"newly":["savf/SC-ILE/EXPERIMENTS/h-flt2/stripped/object.savf 1"],"worse":[]},"full_check":{"exit":0,"seconds":631}} ```
binjovi-bot manually merged commit e3080826bb into trunk 2026-10-23 20:00:06 +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!624
No description provided.