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

stillwater-sc / universal / 41780923296
89%
master: 84%

Build:
Build:
LAST BUILD BRANCH: fix/fixpnt-quire-resolve-saturates
DEFAULT BRANCH: master
Ran 04 Nov 2026 06:03AM UTC
Jobs 1
Files 773
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

04 Nov 2026 05:42AM UTC coverage: 88.569% (+0.03%) from 88.535%
41780923296

push

github

web-flow
fix(fixpnt): clamp Saturate float conversion at the rounding boundary (#1916)

The Saturate range check for a floating-point source compared v against
float(maxpos), which rounds up to 2^(ib-1) once maxpos needs more than 24
bits; the round-to-nearest conversion then carried maxpos + >= 1/2 ulp into
the sign bit: fixpnt<32,0,Saturate>(2147483647.75) was maxneg.

- Clamp at +/-2^(ib-1), a power of two and exact (and a valid constant) in
  every floating-point format, IBM double-double included; a positive value
  that rounds into the sign bit maps to maxpos after the conversion.
- convert_long_double rounded with a saturating ++f, which dropped the carry
  that makes a magnitude just below 2^(ib-1) into maxneg (binary128
  platforms); it now increments the raw bits.
- An x87 long double below 2^-(rbits+1) gave garbage: the rounding shift was
  capped at 64 and a uint64_t shifted by 64 (x86 shifts by 0), so
  fixpnt<16,0>(0.3L) was -26213. The cap is gone and a shift of 64 yields
  zero.

native_conversion adds VerifySaturationBoundary (float, double, long double)
and VerifySubUlpValues (double, long double, both modes), plus <24,0>,
<32,0>, <40,8> and <51,20>. Verified under qemu on riscv64 and ppc64le.

Resolves #1915

BEHAVIOUR-CHANGE: fixpnt<..., Saturate> built from a float, double or long double just above maxpos (by 1/2 ulp or more, below 2^(ib-1)) now clamps to maxpos instead of wrapping to maxneg
BEHAVIOUR-CHANGE: fixpnt<..., Saturate> built from a long double with more than 62 significant bits just above maxneg (within 1 ulp) now gives maxneg instead of maxneg + 1 ulp
BEHAVIOUR-CHANGE: fixpnt built from a long double smaller than 2^-(rbits+1) (x87, nbits <= 62) now gives zero instead of an unrelated value

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

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

1 existing line in 1 file now uncovered.

56304 of 63571 relevant lines covered (88.57%)

8931172.24 hits per line

Coverage Regressions

Lines Coverage ∆ File
1
97.53
-0.06% include/sw/universal/number/cfloat/cfloat_impl.hpp
Jobs
ID Job ID Ran Files Coverage
1 41780923296.1 04 Nov 2026 06:03AM UTC 773
88.57
GitHub Action Run
Source Files on build 41780923296
  • Tree
  • List 773
  • Changed 3
  • Source Changed 1
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #41780923296
  • d2eb9230 on github
  • Prev Build on main (#41752957759)
  • Next Build on main (#41888444018)
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