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

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

Build:
Build:
LAST BUILD BRANCH: chore/ascii-source-cleanup
DEFAULT BRANCH: master
Ran 27 May 2026 01:58PM UTC
Jobs 1
Files 661
Run time 3min
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

27 May 2026 01:20PM UTC coverage: 84.002% (-0.001%) from 84.003%
26513707886

push

github

web-flow
fix(elreal): exact-residual two_prod_host for odd-precision FpTypes (#942) (#1019)

* fix(elreal): exact-residual two_prod_host for odd-precision FpTypes (#942)

The generic Veltkamp/Dekker two_prod_host is exact only for even precision p:
the partial product a_hi*b_hi must fit in p bits (needs 2*ceil(p/2) <= p). For
odd p the split leaks error that grows with p.

Fix: keep Veltkamp/Dekker for even p (exact, stays in host arithmetic); for odd p
compute the residual a*b - p in a double intermediate (>= 2p bits for every host
FpType used in elreal blocks, p <= 26), so the residual is the exact value
rounded to the host type. Only the residual uses the wider type; the rounded
product p = a*b still uses host arithmetic.

Findings while implementing (the issue's premise was partly off):
- bfloat16 has digits=7 (odd) but its odd-p Veltkamp residual was already exact
  (0 ulp^2) -- the split error is negligible at small p. Unchanged.
- The real win is cfloat<24,5> (p=19): 79.6 -> 32 ulp^2.
- cfloat<>'s fma() does NOT help: it is not a fused op (rounds a*b before adding
  -p), so fma(a,b,-p) double-rounds (~32 ulp^2, no better than the double path).
  So issue Option 1 (FMA) is rejected in favor of Option 2 (wider intermediate).
- two_prod is bit-exact only when the residual is REPRESENTABLE in the host.
  cfloat<24,5> (es=5, p=19) underflows the residual into its subnormal range
  (~32 ulp^2 floor) -- a representability limit of the format, not an EFT defect;
  no Dekker/FMA/wider variant can recover it. Wide-exponent hosts (float, double,
  bfloat16) are exact (0 ulp^2).

two_mult.cpp: tightened the value-preservation tolerance 128 -> 64 ulp^2 to
reflect the post-fix bound (max observed ~32 for cfloat<24,5>); it cannot go to
~ulp^2 because of the cfloat<24,5> subnormal-residual floor.

Verified gcc+clang across two_sum/two_mult/two_div.

Resolves #942
Relates to #940 (elreal Phase 4 can now widen its FpType sweep)

Co-Authored-By: Claude Opus 4.7 (1M contex... (continued)

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

12 existing lines in 2 files now uncovered.

46879 of 55807 relevant lines covered (84.0%)

5703824.03 hits per line

Coverage Regressions

Lines Coverage ∆ File
10
31.43
-3.57% include/sw/universal/verification/test_suite_randoms.hpp
2
89.78
-0.55% include/sw/universal/number/posito/posito_impl.hpp
Jobs
ID Job ID Ran Files Coverage
1 26513707886.1 27 May 2026 01:58PM UTC 661
84.0
GitHub Action Run
Source Files on build 26513707886
  • Tree
  • List 661
  • Changed 5
  • Source Changed 1
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26513707886
  • d62c0d26 on github
  • Prev Build on main (#26489993803)
  • Next Build on main (#26516820288)
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