Skip to content

Coverage: all 5 rounding modes, N==0 no-ops, float128 layout#14

Merged
sigilante merged 1 commit into
masterfrom
fix/coverage-quickwins
May 30, 2026
Merged

Coverage: all 5 rounding modes, N==0 no-ops, float128 layout#14
sigilante merged 1 commit into
masterfrom
fix/coverage-quickwins

Conversation

@sigilante
Copy link
Copy Markdown
Collaborator

Phase 4 quick wins from the audit's coverage gaps. Pure test additions; no library changes.

  • C6 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').
  • C3 test_{sasum,sdot,snrm2,saxpy,scopy,sscal}_zeroN==0 is a no-op across the Level-1 families (generalizes sswap_zero).
  • C7 test_qasum_layout — pins the float128 v[0]=lo / v[1]=hi invariant every q* 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

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>
@sigilante sigilante merged commit f392b2c into master May 30, 2026
1 check passed
@sigilante sigilante deleted the fix/coverage-quickwins branch May 30, 2026 16:38
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.

1 participant