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

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

Build:
Build:
LAST BUILD BRANCH: fix/issue-2111-fixpnt
DEFAULT BRANCH: master
Ran 29 Oct 2026 02:37AM 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 02:16AM UTC coverage: 88.248% (+0.01%) from 88.237%
40805366018

push

github

web-flow
fix(posit): sqrt is correctly rounded, natively, for posits wider than 64 bits (#1857)

Posits wider than 64 bits took sqrt through double: 53 correct bits out of
the 61 to 250 they hold, and the extremes of the range overflowed (maxpos of
posit<128,4> is 2^2016). They now use the construction the narrow posits use
since #1856, on 64-bit limbs: the significand is decoded straight from the
encoding's limbs, limb_kernels::sqrtrem gives the exact root and remainder of
N = S * 2^shift, the remainder is the sticky bit, and a limb version of the
uint64 encoder rounds once to nearest, ties to even, saturating at minpos and
maxpos.

posit's generic to_value() decode and convert_ encode cost 289 and 344 ns for
posit<128,4>, against sqrtrem's 21; a version built on them was twice as slow
as the shim. The limb path is 100 ns against the shim's 808, and 148 against
1248 for posit<256,5>.

The test gains a wide oracle: the same midpoint rule on 32-bit words with its
own schoolbook square, checked against the narrow oracle, then random,
near-tie and binade-top inputs for posit<65,2> through posit<256,5>, block
types uint8/32/64, maxpos past double's range, and the extremes.

Relates to #1846

BEHAVIOUR-CHANGE: posit sqrt is correctly rounded for nbits > 64; results change for every posit wider than 64 bits, and sqrt no longer overflows near the ends of their range

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

67 of 68 new or added lines in 1 file covered. (98.53%)

55439 of 62822 relevant lines covered (88.25%)

8782563.27 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
99.12
-0.88% include/sw/universal/number/posit/math/sqrt.hpp
Jobs
ID Job ID Ran Files Coverage
1 40805366018.1 29 Oct 2026 02:37AM UTC 767
88.25
GitHub Action Run
Source Files on build 40805366018
  • Tree
  • List 767
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #40805366018
  • 30238f6e on github
  • Prev Build on main (#40793856941)
  • Next Build on main (#40825932339)
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