Float arithmetic: literals, grouping and %FLOAT #624
Loading…
Reference in a new issue
No description provided.
Delete branch "rpg-9-n-floatexpr-20261023"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Float arithmetic: literals, grouping and %FLOAT
rpg_eval.zig: a float constant whose digits no decimal constant of themodule repeats shows as a float literal (
2.5E0): a decimal literalkeeps a decimal twin beside the float, a float literal has none. The
emitter reads
2.5E0(rpg_source.zig), and%FLOATis a source word.A comparison keeps the plain text.
rpg_eval.zig(binary): arithmetic keeps its grouping:(a - b) / cand
a - (b - c)take parentheses where the operator binds less.rpg_eval.zig: an operand converted to float before the other one isloaded (
29 P; 91 8 0; 27 K; 5), or after75 8; 80 8, is an explicit%FLOAT; two implicit conversions under a float operation are a%FLOATof the operation (%float(i - p)).h-flt6,h-evr(dictionary flt3 to flt6, evr). LEMONADEread-down: statement 177 no longer differs (179 still does: one float
literal of it still has a twin).
Gates