Skip to content

docs: settle the numeric-tower position (#417)#434

Merged
InauguralPhysicist merged 1 commit into
mainfrom
feat/numeric-tower-417
Jul 5, 2026
Merged

docs: settle the numeric-tower position (#417)#434
InauguralPhysicist merged 1 commit into
mainfrom
feat/numeric-tower-417

Conversation

@InauguralPhysicist

Copy link
Copy Markdown
Collaborator

What

The only number kind is the IEEE-754 f64 — now a documented, decided position rather than an unstated default (the survey's missing-dimension finding). SPEC.md gains a "numeric model" subsection stating the contracts it buys, with byte-checked examples:

The decision

Bigint / decimal are deferred until a consumer genuinely forces them — they'd ripple through the JIT and the AOT (whose numeric speed rests on everything-being-a-double). The wording deliberately avoids overcommitting "num is an f64" so a future wider numeric kind could still honor these same contracts (exactness-below-2^53, finiteness, the int64 seam).

Roadmap item promoted from a one-liner to the decided position. Suite 2509/2509.

Closes #417

🤖 Generated with Claude Code

…forced (#417)

The only number kind is the IEEE-754 f64, and that is now a documented, decided
position rather than an unstated default. SPEC.md gains a "numeric model"
subsection stating the contracts it buys, with byte-checked examples:

- integer exactness ends at 2^53 (`9007199254740992 + 1` is invisible);
- arithmetic is finite by construction — `NaN` collapses to 0 (`sqrt of -1` = 0),
  overflow saturates at ±1e308, never Infinity;
- integer bitwise ops act on int64, exact past 2^32 (`1 << 40`) — the seam for
  checksums/hashing/byte protocols (the #382 int32-UB saga is why this is
  spelled out).

Decision: bigint/decimal are deferred until a consumer genuinely forces them —
they would ripple through the JIT and the AOT (whose numeric speed rests on
everything-being-a-double). The wording deliberately avoids overcommitting
"num IS f64" so a future wider kind can still honor these contracts. Roadmap
item promoted from a one-liner to the decided position.

Suite 2509/2509.

Closes #417

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@InauguralPhysicist InauguralPhysicist merged commit 878ef56 into main Jul 5, 2026
17 checks passed
@InauguralPhysicist InauguralPhysicist deleted the feat/numeric-tower-417 branch July 5, 2026 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Design: numeric tower position — f64-only exactness ends at 2^53; settle the bigint/decimal question

1 participant