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

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

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 18 Oct 2026 05:35AM UTC
Jobs 1
Files 752
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:24AM UTC coverage: 87.364% (+0.004%) from 87.36%
39100454297

push

github

web-flow
fix(edecimal): sqrt is the exact floor of the square root at any size (#1732)

edecimal is an adaptive-precision decimal integer. Its sqrt was
edecimal(std::sqrt(double(n))), the floor root only while n fits a
double: wrong in its trailing digits past about 16 digits, and inf
past about 308. The native branch of the EDECIMAL_NATIVE_SQRT switch
referenced names that do not exist and never compiled.

sqrt now returns floor(sqrt(n)), the integer root that integer square
roots return everywhere else and that this function already gave for
small n. It uses Newton's integer iteration x' = (x + n / x) / 2 from
10^ceil(d/2), above the root of a d-digit n. The iteration decreases
strictly until it reaches the floor root and stops there. The switch
is removed. A negative argument throws edecimal_negative_sqrt_arg
under the throw flag; otherwise it sets errno = EDOM and returns 0,
instead of printing to stderr.

elastic/decimal/math/sqrt.cpp checks:
- every n < 20000 by r^2 <= n < (r + 1)^2;
- 129 vectors from Python's math.isqrt
  (tools/generators/edecimal_sqrt_gen.py, reproducible byte for byte):
  integers of up to 400 digits, perfect squares and their neighbours,
  and powers of ten;
- the negative argument, with the throw flag on and off.
On the old header 117 of the vectors fail.

Relates to #1725

BEHAVIOUR-CHANGE: edecimal sqrt is now the exact floor root at any size (it went through double, so it was wrong past ~16 digits and inf past ~308); a negative argument sets errno = EDOM and returns 0 without printing; EDECIMAL_NATIVE_SQRT is removed

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

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

1 existing line in 1 file now uncovered.

50975 of 58348 relevant lines covered (87.36%)

10559526.45 hits per line

Coverage Regressions

Lines Coverage ∆ File
1
32.04
-0.35% include/sw/universal/verification/test_suite_randoms.hpp
Jobs
ID Job ID Ran Files Coverage
1 39100454297.1 18 Oct 2026 05:35AM UTC 752
87.36
GitHub Action Run
Source Files on build 39100454297
  • Tree
  • List 752
  • Changed 3
  • Source Changed 1
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #39100454297
  • fd885087 on github
  • Prev Build on main (#39099257224)
  • Next Build on main (#39104311511)
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