test(conformance): pin specials + over/underflow in the golden vectors - #92
Merged
Conversation
The conformance set was finite-only, so the Inf / -Inf / NaN / +-0 encodings and the overflow->Inf / underflow->0 behaviour were never pinned across bindings. Extend testdata/gf_conformance.csv from 56 to 112 vectors: each of the 8 rungs now also carries inf, -inf, nan, 0.0, -0.0, 1e30 and 1e-30. Hand-checked (gf8, bias 3): inf=0x70 (exp=max,mant=0), nan=0x71 (exp=max,mant=1), -0.0=0x80, 1e30->0x70 (overflow->Inf), 1e-30->0x0 (flush). NaN is input-independent (the codec emits a fixed pattern), so all three languages agree regardless of their NaN payload. Pure data — the Python/C++/Rust readers iterate every row, so no reader code changed. Verified locally: all three pass (112 vectors each). Co-Authored-By: Claude Opus 4.8 <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.
The conformance set was finite-only — the Inf / −Inf / NaN / ±0 encodings and overflow→Inf / underflow→0 were never pinned across bindings. Extends
testdata/gf_conformance.csvfrom 56 → 112 vectors: each of the 8 rungs now also carriesinf,-inf,nan,0.0,-0.0,1e30,1e-30.Hand-checked (gf8, bias 3):
inf=0x70,nan=0x71,-0.0=0x80,1e30→0x70 (overflow→Inf),1e-30→0x0 (flush). NaN is input-independent (codec emits a fixed pattern), so all three languages agree regardless of NaN payload.Pure data — the Python/C++/Rust readers iterate every row, so no reader code changed. Verified locally: all three pass (112 vectors).
🤖 Generated with Claude Code