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

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

Build:
Build:
LAST BUILD BRANCH: fix/fixpnt-quire-resolve-saturates
DEFAULT BRANCH: master
Ran 04 Nov 2026 01:36AM 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 01:16AM UTC coverage: 88.535% (-0.002%) from 88.537%
41752957759

push

github

web-flow
fix(fixpnt): correct Saturate integer conversion and wide negative doubles (#1914)

Saturate division was never wrong at nbits > 64 (#1906); its operands
were. fixpnt<65,32,Saturate>(1) was maxpos, so 1/2 computed
maxpos/maxpos = 1. All three faults are in fixpnt::convert().

- Saturate range check for integers: it compared v against
  static_cast<Arith>(maxpos) and static_cast<Arith>(maxneg). That cast
  keeps the low bits of the integer part, so it wraps as soon as the
  integer part is wider than Arith: fixpnt<48,8,Saturate>(1) was maxpos
  too, at 48 bits. For unsigned sources the cast went through the raw
  encoding, sign-extended, so fixpnt<16,8,Saturate>(1u) was maxneg. For
  signed char and char the cast did not compile. The check now compares v
  against the bound 2^(ib-1), ib = nbits - rbits, in the source type, and
  skips it when every Arith value fits.
- Integer conversion, both modes: the minimum of a signed type set its
  one bit without sign-extending, so fixpnt<48,8>(INT_MIN) was +2^31. An
  unsigned source kept only 64 - rbits bits once ib > 64, so
  fixpnt<128,32>(2^40ull) was 0. Both now fill the integer part.
- Floating-point conversion, both modes: a negative value was negated in
  64 bits and stored without sign extension, so fixpnt<65,32>(-2.0) was
  2^32 - 2 and fixpnt<128,64>(-0.5) was 0.5. The magnitude is now stored
  and the fixpnt negated in its full width.

Tests: the new fixpnt_native_conversion checks every native integer type
against a bit-level reference, through the constructor and assignment,
in both modes on 14 configurations from fixpnt<8,0> to fixpnt<200,100>,
with each configuration's range edges; and exact +/- m*2^k doubles. On
main it fails 6,193 cases (1,265 integer, 4,928 double; the char types
do not compile there). sat_division adds the issue's cases, 1000
random exact quotients and the overflow clamps on fixpnt<65,32>,
<80,40> and <128,64> for each of the four block types.

Resolves #1906

BEHAVIOUR-CHAN... (continued)

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

4 existing lines in 2 files now uncovered.

56281 of 63569 relevant lines covered (88.54%)

8934466.54 hits per line

Coverage Regressions

Lines Coverage ∆ File
3
93.25
-0.26% include/sw/universal/number/fixpnt/fixpnt_impl.hpp
1
93.16
-0.85% include/sw/universal/verification/correctly_rounded_reference.hpp
Jobs
ID Job ID Ran Files Coverage
1 41752957759.1 04 Nov 2026 01:36AM UTC 773
88.54
GitHub Action Run
Source Files on build 41752957759
  • 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 #41752957759
  • ee96ce31 on github
  • Prev Build on main (#41738383195)
  • Next Build on main (#41780923296)
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