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

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

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 23 May 2026 05:16PM 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 04:49PM UTC coverage: 84.277% (+0.001%) from 84.276%
26338255293

push

github

web-flow
fix(ereal): improve regression tests for ereal (#943)

* fix(ereal): improve regression tests

* fix(ereal): canonicalise expansion after operator+= / operator-=

The new addition tests in this PR (commutativity, associativity)
exposed a real implementation bug, not a test issue. The MSVC failure
the user observed reproduces on Linux gcc and clang too.

Root cause
- `linear_expansion_sum` (Shewchuk Figure 7) produces a non-overlapping
  expansion but not a canonical Priest-form one. The same real value
  emerges as different limb sequences depending on input ordering:

    (a + b) + c with a=1e+15, b=1, c=1e-15 -> [1e+15, 1e-15]      (2 limbs)
    (c + b) + a with same values            -> [1e+15, 1.11e-15, -1.10e-16]
                                                                 (3 limbs)

  Both represent the same real value. `compare_adaptive` does a
  limb-by-limb walk, so it (correctly) reports the two representations
  as unequal -- breaking the commutativity / associativity / equality
  contracts the new tests assert.

Fix
- Pipe the linear_expansion_sum result through renormalize_expansion
  (already in expansion_ops.hpp; uses grow_expansion to rebuild as a
  canonical non-overlapping expansion that's representation-unique).
- Applied to operator+=(ereal), operator+=(double), operator-=(ereal).
  operator-=(double) delegates to operator-=(ereal) so inherits the fix.
- Multiplication/division have separate code paths and are not touched.

Cost: one O(m) renormalize pass per add/sub. Acceptable given that
without it the type does not satisfy basic algebraic invariants.

Validation
- gcc 13.3 debug + release: PR's new addition tests PASS; full ereal
  regression (38 tests) PASS.
- clang 18.1 debug + release: same.
- The MSVC commutativity failure the user reported should also clear
  once CI reruns -- the bug was platform-independent, just unmasked
  by the new commutativity test.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic... (continued)

3 of 3 new or added lines in 1 file covered. (100.0%)

13 existing lines in 4 files now uncovered.

47120 of 55911 relevant lines covered (84.28%)

5265880.75 hits per line

Coverage Regressions

Lines Coverage ∆ File
9
40.0
-17.14% include/sw/universal/number/ereal/manipulators.hpp
2
89.78
-0.55% include/sw/universal/number/posito/posito_impl.hpp
1
80.8
0.0% include/sw/universal/number/posit1/specialized/posit_16_1.hpp
1
34.64
3.21% include/sw/universal/verification/test_suite_randoms.hpp
Jobs
ID Job ID Ran Files Coverage
1 26338255293.1 23 May 2026 05:16PM UTC 656
84.28
GitHub Action Run
Source Files on build 26338255293
  • Tree
  • List 656
  • Changed 5
  • Source Changed 1
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26338255293
  • 2ef6a8ce on github
  • Prev Build on main (#26332478004)
  • Next Build on main (#26339545423)
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