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

stillwater-sc / universal / 29886492854
85%
master: 84%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 22 Jul 2026 03:24AM UTC
Jobs 1
Files 703
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

22 Jul 2026 02:41AM UTC coverage: 84.733% (+0.02%) from 84.712%
29886492854

push

github

web-flow
feat(elreal): Phase 8 real floating-point conversion -- round_to<double|float|dd|qd> (#932) (#1181)

Adds round_to<Target>(ZBCL<FpType> x, RoundingMode = RoundToNearest) -> Target,
the primitive that hands an exact-real elreal intermediate to the rest of the
library as a correctly-rounded double, float, dd, or qd.

Method (dissertation 4.3): a ZBCL is a 0-overlap (non-overlapping) expansion, so
its blocks widened to double form a Shewchuk expansion of the exact value. To
round to P significand bits, split each block at the cut bit e0-P+1 into a kept
part (>= cut) and a round-off part (< cut); renormalise the round-off so
opposite-sign cancellation collapses to its true leading magnitude; classify it
against the half-ulp 2^(cut-1); then apply the mode and renormalise the kept
expansion. double/float take one limb (P=53/24); dd/qd take two/four (106/212)
via their raw limb constructors. Reuses sw::universal::RoundingMode; no new enum.

The subtle case is the SIGNED non-overlapping tail: block[1] can be negative, so
the value sits below the leading block -- the round-off must be renormalised
before the half-ulp comparison, else an opposite-sign sub-half tail is misread
as > half.

All four modes (nearest ties-to-even, toward zero, toward +inf, toward -inf)
validated exhaustively against an independent exact einteger-dyadic oracle:
320,000 roundings across the four targets x four modes, 0 mismatches.

New elastic/elreal/rounding/round_to.cpp covers the issue's acceptance criteria:
correctly-rounded (vs the dyadic oracle), idempotence, monotonicity across the
nested pairs (double,float)/(dd,double)/(qd,dd) -- i.e. no double-rounding --
lossless roundtrip round_to<double>(from_native(x))==x, and path-independent
determinism. Fast (~0.2s), runs at every regression level. gcc + clang,
warning/cppcheck/ASCII clean.

cfloat<N,E> (bit-level construction + arbitrary exponent-range handling) is a
distinct sub-problem, scoped to a follow-up.

Resolves #932
Relates ... (continued)

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

16 existing lines in 3 files now uncovered.

50005 of 59015 relevant lines covered (84.73%)

6850097.99 hits per line

Coverage Regressions

Lines Coverage ∆ File
10
31.43
-3.57% include/sw/universal/verification/test_suite_randoms.hpp
4
81.47
0.0% include/sw/universal/number/posit1/specialized/posit_16_1.hpp
2
89.78
0.0% include/sw/universal/number/posito/posito_impl.hpp
Jobs
ID Job ID Ran Files Coverage
1 29886492854.1 22 Jul 2026 03:24AM UTC 703
84.73
GitHub Action Run
Source Files on build 29886492854
  • Tree
  • List 703
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #29886492854
  • f05aa7e3 on github
  • Prev Build on main (#29876384483)
  • Next Build on main (#29919328064)
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