Skip to content

Numeric silent-wrong mining: differential corpus vs Julia/R/NumPy (before #1644 numbers phase) #1656

Description

@InauguralPhysicist

Mine the numeric semantics that Julia, R and NumPy settled deliberately long ago, to find EigenScript's silent wrongs before the numbers phase of #1644 decides them. This is a differential corpus, not a guest-language port: ports of near-home languages yield few gaps, but these languages solved exactly the numeric edge cases where our silent wrongs keep turning up (#1649 sum skips non-numbers, the fail-soft audits, the AOT's aot_num_or(..., 0.0) sites).

Owner request (2026-10-07): log it so it doesn't get forgotten. Run it after the current bool/EigenLua work, ideally as a cloud run. The oracles (Julia, R, NumPy) are installed only in the sandbox; no Python enters any repo.

Edge-case axes, per numeric builtin

  • NaN in reductions and ordering: min/max/sort/mean/sum (NumPy max vs nanmax; R's NA vs NaN).
  • Empty reductions: sum([]), mean([]), max([]), min([]).
  • inf, -inf and -0.0: arithmetic, comparison, printing, use as a key.
  • Integer overflow and precision past 2^53 (Julia wraps, with checked types; R gives NA plus a warning).
  • Float printing: shortest round-trip, -0.0, rounding mode (half-even).
  • Mixed types: number + bool/string/null in every numeric builtin. It must raise, never skip or coerce.
  • Missing-value propagation (R's NA rules as a design reference).

Done when

  • A corpus covers every numeric builtin from eigenscript --api --json against each axis above, with each case's output recorded from EigenScript, Julia, R and NumPy.
  • Every disagreement is triaged as either (a) a silent-wrong issue filed with a reproducer, or (b) a deliberate EigenScript choice written into docs/SPEC.md with its reason.
  • The results are linked from Value-model release: booleans, then integers, strings and map keys in ONE breaking release #1644 before its numbers phase gets an owner decision.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:stdlibSubsystem: stdlibkind:silent-wrongWrong answer with rc 0 -- the worst class; outranks every other kind

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions