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

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

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 27 May 2026 02:40AM UTC
Jobs 1
Files 661
Run time 2min
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

27 May 2026 02:01AM UTC coverage: 83.975% (-0.03%) from 84.004%
26486254675

push

github

web-flow
fix(ereal): parse high-precision decimals without precision loss or NaN (#1006) (#1011)

ereal::parse() built the mantissa as a giant integer M and multiplied by
10^(-e). Two failures:

- NaN for inputs needing |exponent| >= 309: 10^e (and M for >308-digit integers)
  exceed DBL_MAX, so the leading component became inf and the EFT error term NaN.
- Precision decayed ~1 decimal digit per power of ten: 10^(-e) is a
  subnormal-range value (1/10^300 ~ 1e-300, whose 2nd component ~1e-316 is below
  DBL_MIN), so it cannot hold more than ~1 normal component -- capping results
  near 16 digits regardless of maxlimbs.

Root primitive fix (expansion_quotient): scale the divisor to near-unit
magnitude by an exact power of two (ldexp) before the Newton reciprocal, form
the product in normal range, then apply the exact 2^-k. The reciprocal now
operates on a normal, near-unit operand, so division keeps full precision
whenever the quotient is in normal range. Renormalize after the ldexp to strip
any components that underflowed to zero (restores Priest canonical form). This
also benefits every other ereal division of a large/small-magnitude operand.

parse() changes:
- Apply a negative exponent by DIVIDING by the normal-range 10^e (full precision
  via the fixed quotient) instead of multiplying by the subnormal 10^-e.
- Cap significant-digit accumulation at MAX_SIG_DIGITS (<= 307) so M stays below
  DBL_MAX; dropped integer digits scale the exponent, sub-precision fraction
  digits are dropped. Skip leading zeros.
- Apply |exponent| in chunks of <= 10^308 so out-of-range values saturate to
  inf (overflow) or 0 (underflow) rather than NaN.
- Cap the result to maxlimbs components (the leading, canonical-order ones carry
  the full value; the rest would be subnormal, violating the EFT invariant).

Result: parse precision scales with input length to ereal<19>'s ~306 digits
(verified 7*parse("0.1428...") == 1 to 100-300 digits); 1e400 -> +inf,
1e-400 -> 0, no NaN for an... (continued)

38 of 41 new or added lines in 2 files covered. (92.68%)

22 existing lines in 7 files now uncovered.

46826 of 55762 relevant lines covered (83.97%)

5780168.96 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
93.75
-0.45% include/sw/universal/internal/expansion/expansion_ops.hpp

Coverage Regressions

Lines Coverage ∆ File
8
93.64
-0.47% include/sw/universal/number/cfloat/cfloat_impl.hpp
5
50.45
-4.5% include/sw/universal/verification/posit_test_suite_randoms.hpp
3
76.19
-14.29% include/sw/universal/number/ereal/mathlib.hpp
2
84.14
0.23% include/sw/universal/number/ereal/ereal_impl.hpp
2
89.78
0.0% include/sw/universal/number/posito/posito_impl.hpp
1
81.47
0.0% include/sw/universal/number/posit1/specialized/posit_16_1.hpp
1
31.07
-0.36% include/sw/universal/verification/test_suite_randoms.hpp
Jobs
ID Job ID Ran Files Coverage
1 26486254675.1 27 May 2026 02:40AM UTC 661
83.97
GitHub Action Run
Source Files on build 26486254675
  • Tree
  • List 661
  • Changed 8
  • Source Changed 2
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26486254675
  • 414ab85d on github
  • Prev Build on main (#26480863994)
  • Next Build on main (#26486877158)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc