Coverage: all 5 rounding modes, N==0 no-ops, float128 layout#14
Merged
Conversation
Phase 4 quick wins from the audit's coverage gaps:
- test_saxpy_rounding_modes (C6): exercises all five rounding modes on a
positive and a negative half-ULP tie (1.0 +/- 2^-24). Distinguishes
every mode -- round-up vs round-down by sign, round-toward-zero vs
round-down on the negative operand, 'a' rounding outward on both ties,
'n' staying (1.0 has an even mantissa). First test to prove all five
documented modes are honored, not just 'u' vs 'n'.
- test_{sasum,sdot,snrm2,saxpy,scopy,sscal}_zero (C3): N==0 is a no-op --
reductions return 0, axpy/copy/scal leave their output untouched.
Generalizes the existing sswap_zero across the Level-1 families.
- test_qasum_layout (C7): pins the float128_t storage invariant every q*
test depends on -- sign+exponent in the high word v[1], low mantissa in
v[0].
151/151 tests pass.
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.
Phase 4 quick wins from the audit's coverage gaps. Pure test additions; no library changes.
test_saxpy_rounding_modes— all five rounding modes on a positive and negative half-ULP tie (1.0 ± 2⁻²⁴). Distinguishes every mode: up vs down by sign, toward-zero vs down on the negative operand,'a'rounding outward on both ties,'n'staying (1.0 has an even mantissa). The first test proving all five documented modes are honored (the existing one only checked'u'vs'n').test_{sasum,sdot,snrm2,saxpy,scopy,sscal}_zero—N==0is a no-op across the Level-1 families (generalizessswap_zero).test_qasum_layout— pins the float128v[0]=lo / v[1]=hiinvariant everyq*test depends on.151/151 pass. Remaining Phase 4 (larger): C1 NaN/Inf determinism, C4 transpose paths, C5 padding across precisions, C8 complex/rot test-or-downgrade.
🤖 Generated with Claude Code