• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stillwater-sc / universal / 26341266844
84%
master: 84%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 23 May 2026 07:39PM UTC
Jobs 1
Files 656
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

23 May 2026 07:16PM UTC coverage: 84.271% (-0.02%) from 84.292%
26341266844

push

github

web-flow
fix(ereal): port Priest canonical renormalize to fix associativity (#961)

Resolves the associativity-on-random-multi-limb-inputs bug surfaced by
the fuzzer in PR #958. Root cause documented in #959: the prior
renormalize_expansion used grow_expansion sequentially, producing a
non-overlapping but order-dependent output. Two expressions with the
same real value could renormalize to different limb sequences, and
compare_adaptive's limb-by-limb test reported them unequal -- breaking
associativity for ~0.5% of random multi-limb pairs.

Algorithm
- Replace renormalize_expansion's body with a Priest-style canonical
  renormalize: sweepUp (back-to-front cumulative twoSum, residual-first)
  then recurse on the tail, then sweepDown (top-down accumulation), then
  prepend the leading carry. The output is value-canonical: equal-valued
  inputs produce equal limb sequences regardless of how the input was
  built.
- Helpers live in `detail_priest::` namespace inside
  internal/expansion/expansion_ops.hpp:
    sweepUpRec, sweepUp, sweepDownRec, sweepDown, remove_zeros,
    priest_renormalize.
- Algorithm ported from elreal's Phase 4 McCleeary work
  (threeAdd.hpp sweepUp/sweepDown/priestRenorm); same pattern also
  appears in Bailey/Hida's qd Renormalize.

Cost: O(m^2) two_sum calls per renormalize in the worst case. For
ereal<maxlimbs <= 19> this is at most ~190 two_sum calls -- still O(1)
in practice for fixed maxlimbs.

Test updates
- Un-gated the fuzzer associativity check in
  elastic/ereal/arithmetic/addition.cpp (the #if 0 with
  "re-enable when #959 is fixed").

Validation
- gcc 13.3 debug: foundational PASS, fuzz x1k PASS, fuzz x100k PASS,
  fuzz x10M PASS (0 associativity failures across 10M random
  multi-limb triples; previously this saw ~45k failures).

Resolves #959

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

56 of 60 new or added lines in 1 file covered. (93.33%)

16 existing lines in 4 files now uncovered.

47176 of 55981 relevant lines covered (84.27%)

5290751.59 hits per line

Uncovered Changes

Lines Coverage ∆ File
4
95.62
-1.07% include/sw/universal/internal/expansion/expansion_ops.hpp

Coverage Regressions

Lines Coverage ∆ File
10
31.43
-3.57% include/sw/universal/verification/test_suite_randoms.hpp
3
80.58
-0.67% include/sw/universal/number/posit1/specialized/posit_16_1.hpp
2
89.78
-0.55% include/sw/universal/number/posito/posito_impl.hpp
1
95.62
-1.07% include/sw/universal/internal/expansion/expansion_ops.hpp
Jobs
ID Job ID Ran Files Coverage
1 26341266844.1 23 May 2026 07:39PM UTC 656
84.27
GitHub Action Run
Source Files on build 26341266844
  • Tree
  • List 656
  • Changed 4
  • Source Changed 1
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26341266844
  • efa4953a on github
  • Prev Build on main (#26340179255)
  • Next Build on main (#26341889979)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc