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

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

Build:
Build:
LAST BUILD BRANCH: fix/fixpnt-quire-resolve-saturates
DEFAULT BRANCH: master
Ran 01 Nov 2026 03:54AM UTC
Jobs 1
Files 772
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

01 Nov 2026 03:27AM UTC coverage: 88.329% (-0.007%) from 88.336%
41269277659

push

github

web-flow
fix(dd): exact two_prod residual at the top of the double range (#1884)

* fix(dd): exact two_prod residual at the top of the double range

Dekker's two_prod splits each factor into 26-bit halves. For a factor
within 2^-27 of 2^1024 the high half rounds up to 2^996 in split()'s
scaled domain and comes back as 2^1024 = inf; for a product in the top
binade a_hi * b_hi can pass DBL_MAX. Either way the residual of a finite
product came back NaN, so dd and qd multiply and divide (and dd_cascade
division, through qd_mul) returned NaN at the top of the range:
dd(DBL_MAX) * dd(0.5), dd(DBL_MAX) / dd(2), dd(DBL_MAX) * dd(2^-512).

No 26-bit high half of DBL_MAX is finite, so the fix is in the residual,
not in split(). dekker_residual() handles both cases by exact power-of-two
scaling: a factor above the split threshold moves down by 2^28 and the
other up by 2^28 (product unchanged); a product above 2^1000 is formed in
a domain scaled down by 2^28 and its residual scaled back up.

At run time the plain Dekker residual is formed first and the scaled one
only when it is not finite: any overflow in the sequence leaves inf or NaN,
and without one the residual is exact. One test on the result keeps dd and
qd multiply/divide at main's speed (an up-front test on the operands cost
5-11%). Constant evaluation tests the operands first, since an overflow
there is not a constant expression (main's two_prod(DBL_MAX, 0.5) did not
compile in a constexpr context). two_sqr gets the same treatment, and
floatcascade's FMA-free two_prod (constexpr, or an untrusted fma) now
calls dekker_residual.

New static/highprecision/dd/arithmetic/range_extremes.cpp: two_prod and
two_sqr against an fma oracle over the top binades (static_asserts for
the constexpr branch), and * and / at DBL_MAX for dd, qd, dd_cascade,
td_cascade and qd_cascade.

Resolves #1881

BEHAVIOUR-CHANGE: dd and qd multiply/divide (and dd_cascade divide) at the top of the double range return the exact result instead of ... (continued)

34 of 48 new or added lines in 2 files covered. (70.83%)

7 existing lines in 4 files now uncovered.

55904 of 63291 relevant lines covered (88.33%)

8858822.92 hits per line

Uncovered Changes

Lines Coverage ∆ File
13
77.27
0.52% include/sw/universal/numerics/error_free_ops.hpp
1
84.06
0.25% include/sw/universal/internal/floatcascade/floatcascade.hpp

Coverage Regressions

Lines Coverage ∆ File
2
96.91
-0.13% include/sw/universal/number/cfloat/cfloat_impl.hpp
2
84.93
-0.68% include/sw/universal/number/dd_cascade/dd_cascade_impl.hpp
2
82.52
-0.3% include/sw/universal/number/qd/qd_impl.hpp
1
77.27
0.52% include/sw/universal/numerics/error_free_ops.hpp
Jobs
ID Job ID Ran Files Coverage
1 41269277659.1 01 Nov 2026 03:54AM UTC 772
88.33
GitHub Action Run
Source Files on build 41269277659
  • Tree
  • List 772
  • Changed 7
  • Source Changed 2
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #41269277659
  • 90f9fe57 on github
  • Prev Build on main (#41140318523)
  • Next Build on main (#41269533638)
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