fix: float arithmetic codegen (segfault/garbage) and math_log aliasing #104

Merged
will.anderson merged 1 commits from worktree-agent-a456e0cf8cd2ee361 into dev 2026-08-15 19:54:49 +00:00
Owner

Preserving uncommitted work found in an open worktree during a worktree audit. Float + previously fell through to string concat (segfault); -, *, /, % operated on raw IEEE-754 bit patterns as integers (garbage results). Floats are now tracked via a __float_names typed-binding set (parallel to the existing int-tracking scheme) and arithmetic is emitted as real C double ops. Also fixes math_log, which was wrongly aliased to natural log (duplicating math_ln) — now uses log10 — and adds the missing <math.h> include. Rebuilt elc binary included.

Preserving uncommitted work found in an open worktree during a worktree audit. Float + previously fell through to string concat (segfault); -, *, /, % operated on raw IEEE-754 bit patterns as integers (garbage results). Floats are now tracked via a __float_names typed-binding set (parallel to the existing int-tracking scheme) and arithmetic is emitted as real C double ops. Also fixes math_log, which was wrongly aliased to natural log (duplicating math_ln) — now uses log10 — and adds the missing <math.h> include. Rebuilt elc binary included.
will.anderson added 1 commit 2026-08-15 19:24:37 +00:00
Fix float arithmetic codegen and math_log aliasing
El SDK CI - dev / build-and-test (pull_request) Failing after 10m8s
2f832c8def
Float + previously fell through to string concat (segfault); -, *, /, %
operated on raw IEEE-754 bit patterns as integers (garbage results). Floats
are now tracked via a __float_names typed-binding set (parallel to the
existing int-tracking scheme) and arithmetic is emitted as real C double
ops.

Also fixes math_log, which was wrongly aliased to natural log (duplicating
math_ln) — now uses log10 — and adds the missing <math.h> include. Rebuilt
elc binary included.
will.anderson merged commit 09ae14a970 into dev 2026-08-15 19:54:49 +00:00
Sign in to join this conversation.