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

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

Build:
Build:
LAST BUILD BRANCH: fix/issue-2111-fixpnt
DEFAULT BRANCH: master
Ran 29 Oct 2026 12:36AM UTC
Jobs 1
Files 767
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

29 Oct 2026 12:24AM UTC coverage: 88.237% (+0.01%) from 88.226%
40793856941

push

github

web-flow
fix(posit): sqrt is correctly rounded, natively, for nbits <= 64 (#1856)

sqrt went through double: posit(std::sqrt(double(a))). That rounds twice,
and is correct only while 53 >= 2p + 2, that is nbits <= 27 + es. It
misrounded posit<32,2> near ties (#1776) and 97.7% of posit<64,3>.

Now sqrt takes the integer square root of the significand: a 128-bit N
with an even exponent, R = isqrt(N) from a double seed, one correction
from the exact residual and an exact fix-up, then R and the sticky bit
N != R^2 rounded once by posit's uint64 encoder. That is correctly
rounded, and also faster than the conversion to double it replaces.

- posit gains setpositive(scale, fraction, num_fbits), a public wrapper
  of the private uint64 encoder.
- Removed: POSIT_NATIVE_SQRT and its value<> path; the POSIT_FAST_POSIT_*
  sqrt blocks, which no header enabled any more, and their defines in
  the benchmarks and cg drivers; the lookup tables for posit<3,0>,
  <3,1>, <4,0>, <5,0>, <8,0>, <8,1> (sqrt_tables.hpp). The posit<3,1>
  table was wrong: sqrt(1/4) is a tie, and goes to 1.
- Posits wider than 64 bits keep the double path until the multi-limb
  square root (#1846).
- New static/tapered/posit/math/sqrt.cpp. The oracle is the posit
  rounding rule, exact in integers: every encoding up to 16 bits,
  random and near-tie inputs to 64 bits with three block types, and up
  to every positive posit<32,2> at level 4.

Resolves #1776
Relates to #1846

BEHAVIOUR-CHANGE: posit sqrt is correctly rounded for nbits <= 64; results change for posits wider than 27 + es bits
BEHAVIOUR-CHANGE: posit<3,1> sqrt(0.25) is now 1 (ties to even), not 0.25

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

50 of 50 new or added lines in 2 files covered. (100.0%)

2 existing lines in 1 file now uncovered.

55373 of 62755 relevant lines covered (88.24%)

8787339.08 hits per line

Coverage Regressions

Lines Coverage ∆ File
2
82.83
-0.3% include/sw/universal/number/qd/qd_impl.hpp
Jobs
ID Job ID Ran Files Coverage
1 40793856941.1 29 Oct 2026 12:36AM UTC 767
88.24
GitHub Action Run
Source Files on build 40793856941
  • Tree
  • List 767
  • Changed 4
  • Source Changed 2
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #40793856941
  • 9e1acfc9 on github
  • Prev Build on main (#40630929533)
  • Next Build on main (#40805366018)
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