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

stillwater-sc / universal / 30315637420
85%
master: 84%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 28 Jul 2026 12:32AM UTC
Jobs 1
Files 638
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

27 Jul 2026 11:54PM UTC coverage: 85.437% (-0.03%) from 85.464%
30315637420

push

github

web-flow
feat(fixpnt): add fused fma(a,b,c) with single rounding (#1230)

* feat(fixpnt): add fused fma(a,b,c) with single rounding

fixpnt had no fma. Add a free sw::universal::fma(a,b,c) that forms a*b + c in
a wide exact intermediate and rounds ONCE, matching std::fma's fused contract.

The product a*b is formed exactly as a 2*nbits two's-complement value via urmul2
(the same primitive fixpnt::operator*= uses); c is sign-extended and shifted into
the product's 2*rbits-fractional frame and added exactly; only then is the result
rounded (round-to-nearest-even at rbits, via blockbinary::roundingMode) and
range-limited (Modulo wrap / Saturate clamp). This mirrors operator*='s rounding
model but folds c in before the single rounding, so fma is strictly more accurate
than the two-rounding fixpnt(a*b) + c whenever the product's low-order bits matter.

Test (static/fixpnt/binary/math/fma.cpp) validates against an INDEPENDENT __int128
integer oracle (a,b,c are exact multiples of 2^-rbits, so a*b+c is an exact
rational; the oracle rounds it round-to-nearest-even then applies the range
policy): exhaustive (a,b) for small configs, randomized correctly-rounded checks
across Modulo/Saturate up to fixpnt<32,16>, single-rounding superiority (the naive
two-rounding form disagreed with the exact result in 30/5000 cases; fma matched
the oracle in all), identities, and saturation/overflow corners.

Note: the wide accumulator must be explicitly zeroed -- blockbinary is trivially
constructible, so gcc happened to clear the stack but clang did not, which leaked
into fma(0,b,c). Green on gcc + clang.

Resolves #1191
Relates to #1189

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(fixpnt): drop __int128 from fma test oracle (MSVC has no __int128)

MSVC does not support __int128 (error C4235), breaking the Windows/MSVC CI build.
Rewrite the fma test's integer oracle in exact int64: fold c in as the integer
part (value = (A*B/2^rbits + C)) instead of mate... (continued)

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

23 existing lines in 4 files now uncovered.

46840 of 54824 relevant lines covered (85.44%)

6784887.12 hits per line

Coverage Regressions

Lines Coverage ∆ File
10
31.43
-3.57% include/sw/universal/verification/test_suite_randoms.hpp
8
93.73
-0.47% include/sw/universal/number/cfloat/cfloat_impl.hpp
3
80.58
-0.67% include/sw/universal/number/posit1/specialized/posit_16_1.hpp
2
89.78
0.0% include/sw/universal/number/posito/posito_impl.hpp
Jobs
ID Job ID Ran Files Coverage
1 30315637420.1 28 Jul 2026 12:32AM UTC 638
85.44
GitHub Action Run
Source Files on build 30315637420
  • Tree
  • List 638
  • Changed 7
  • Source Changed 1
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30315637420
  • 193759d8 on github
  • Prev Build on main (#30278083129)
  • Next Build on main (#30333181328)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc