docs: settle the numeric-tower position (#417)#434
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
9007199254740992 + 1is invisible.NaNcollapses to0(sqrt of -1= 0), overflow saturates at ±1e308, neverInfinity.1 << 40) — the seam for checksums/hashing/byte protocols. (The Stdlib train: num-of hex contract, bit_* int64 alignment, checksum.eigs, datetime civil math #382 int32-UB saga is why this is spelled out explicitly.)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