You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
t27b lane 4: @abs, @max, @min and std.math.pi / std.math.e #7394
specs/port/trinity/src/tri/string_dualities.t27: ExprFieldAccess (std.math.pi), then ExprCall(@abs).
The plan is one backend slice in cli/t27b:
@abs(x) lowers the way a bare abs(x) already does, because the reference prints both as Zig's @abs. A typed integer operand is still refused, because Zig's @abs of an iN is a uN.
@max(a, b) and @min(a, b) take two operands. Zig 0.16 in Debug was measured on the t27b lab:
Floats of one type: a NaN operand gives the other operand. When the operands compare equal (-0.0, +0.0), the first operand is the result.
A literal beside a typed float takes that float's type.
Integers of one type give the larger or smaller value.
Each operand is evaluated once.
Still refused:
an integer beside a literal (Zig narrows the result type);
mixed types;
two literals;
more than two operands.
std.math.pi and std.math.e become the comptime_float literals that Zig's std/math.zig declares, rounded to binary128 as Zig rounds them. The other std.math names stay refused.
The conformance fixture specs/tri/t27b/conformance/builtin_abs_max_min_pi.t27 comes first. It passes t27c test-report 12/12 with 0 vacuous tests before any Rust changes.
Foreign-line budget (owner rule #7371, merged in #7399): PR #7411 is over it, so it is now a draft with auto-merge off.
Master's check_budget() run on git diff --numstat --no-renames origin/master...claude/t27b-lane4-abs-max-pi:
file
added
cap
cli/t27b/src/lower_float.rs
128
40 per file
cli/t27b/src/lower.rs
5
40 per file
whole PR
133
80 per PR
The owner-approved-foreign label does not lift this cap, and splitting the work into smaller PRs to get under it would dodge the rule, so I am not doing that. The lowering of @abs / @max / @min / std.math.pi has to move into .t27 and come out of gen-rust, with only thin glue left by hand. The conformance spec specs/tri/t27b/conformance/builtin_abs_max_min_pi.t27 and the ledger rows (dqn, string_dualities) stay valid for that rework.
Reopened 2026-10-07: the bulk close of issues without a ## Boundary section was reverted by the owner. Nothing to do here; this comment replaces the earlier close notice.
Activity
t27b: @abs, @max, @min and std.math.pi / e lower; dqn and string_dual…
gHashTag commentedon Oct 7, 2026
Foreign-line budget (owner rule #7371, merged in #7399): PR #7411 is over it, so it is now a draft with auto-merge off.
Master's
check_budget()run ongit diff --numstat --no-renames origin/master...claude/t27b-lane4-abs-max-pi:cli/t27b/src/lower_float.rscli/t27b/src/lower.rsThe
owner-approved-foreignlabel does not lift this cap, and splitting the work into smaller PRs to get under it would dodge the rule, so I am not doing that. The lowering of@abs/@max/@min/std.math.pihas to move into.t27and come out of gen-rust, with only thin glue left by hand. The conformance specspecs/tri/t27b/conformance/builtin_abs_max_min_pi.t27and the ledger rows (dqn, string_dualities) stay valid for that rework.Part of #6063. PR: #7411.
gHashTag commentedon Oct 7, 2026
Reopened 2026-10-07: the bulk close of issues without a
## Boundarysection was reverted by the owner. Nothing to do here; this comment replaces the earlier close notice.t27b ledger: six specs move to pass, the two new specs are listed (Cl…
t27b: builtin_plan.t27 tests compare strings with std.mem.eql (Closes #…
t27b: no conformance test pins the sign of @max / @min of -0.0 and +0…