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

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

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 18 Oct 2026 05:24AM UTC
Jobs 1
Files 751
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

18 Oct 2026 05:03AM UTC coverage: 87.33% (+0.005%) from 87.325%
39099250958

push

github

web-flow
fix(fixpnt): sqrt is the correctly rounded integer root, whichever headers are included (1730)

fixpnt had two square roots. fixpnt.hpp defaulted FIXPNT_NATIVE_SQRT
to 1 and selected a Babylonian iteration that stopped on an epsilon
test, not at the correctly rounded root. That iteration also printed
and threw on a negative argument whatever
FIXPNT_THROW_ARITHMETIC_EXCEPTION said. math/sqrt.hpp defaulted the
switch to 0 and returned fixpnt(std::sqrt(double(a))). So a
translation unit that included the core and mathlib without the
umbrella got a root through double.

A fixpnt value is N 2^-rbits, so the root is R 2^-rbits with R the
integer nearest sqrt(N 2^rbits). That is now computed exactly by a
restoring integer square root on a small multiword integer. With
s = floor(sqrt(M)), the root rounds up exactly when the remainder
M - s^2 exceeds s. No tie can occur, since (s + 1/2)^2 is not an
integer. A format without an integer bit saturates the one root it
cannot hold. The switch is removed, along with the define of it in
applications/precision/numeric/constants.cpp.

fixpnt has no NaN. A negative argument throws fixpnt_negative_sqrt_arg
under FIXPNT_THROW_ARITHMETIC_EXCEPTION, and otherwise sets
errno = EDOM and returns 0.

static/fixpnt/binary/math/sqrt.cpp judges in integer<320>,
independent of the implementation: R is correct exactly when
(2R - 1)^2 <= 4 N 2^rbits <= (2R + 1)^2, or R is maxpos for a root
beyond it. It runs exhaustively over fixpnt<8,4>, <8,8>, <12,0>,
<12,11> saturating, <16,8> and <16,12> saturating, and samples
<32,16>, <64,32>, <80,60> and <128,64>. The negative case passes with
the throw flag on and off. On the old headers every configuration
fails: 53, 116, 2043, 1642, 14997, 5860, 4800, 4990, 1234 and 505
cases. A negative argument there also throws although the
configuration does not ask for it.

Relates to #1725

BEHAVIOUR-CHANGE: fixpnt sqrt is now correctly rounded (the default Babylonian iteration and the through-double ... (continued)

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

2 existing lines in 1 file now uncovered.

50910 of 58296 relevant lines covered (87.33%)

10452558.54 hits per line

Coverage Regressions

Lines Coverage ∆ File
2
96.91
-0.13% include/sw/universal/number/cfloat/cfloat_impl.hpp
Jobs
ID Job ID Ran Files Coverage
1 39099250958.1 18 Oct 2026 05:24AM UTC 751
87.33
GitHub Action Run
Source Files on build 39099250958
  • Tree
  • List 751
  • Changed 4
  • Source Changed 1
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #39099250958
  • 7da987fa on github
  • Prev Build on main (#39099246021)
  • Next Build on main (#39099257224)
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