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

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

Build:
Build:
LAST BUILD BRANCH: fix/posit-encoding-to-ull
DEFAULT BRANCH: master
Ran 18 Jul 2026 07:43PM UTC
Jobs 1
Files 695
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 Jul 2026 07:02PM UTC coverage: 84.7% (+0.01%) from 84.689%
29657033445

push

github

web-flow
fix(efloat): parse() high precision without silent garbage (+ BigBits budget) (#1144)

* fix(efloat): parse() high precision without silent garbage; add BigBits budget

parse() silently returned ~0 once the requested precision approached the d2b
working budget (issue #1141). Root cause: parse capped target_bits at
default_big_bits-8 (2040) and called convert<2048>, but convert's reduction
left-shifts the digit-integer by ~(target + 3*neg_E) bits (neg_E = fractional
places + any negative scientific exponent). For a target anywhere near 2048 that
shift overflows the BigBits integer and convert returns garbage -- so the 2040
cap was itself unsafe, and even a short literal like pi produced ~0 at high
precision.

Two changes:
- Template parse on BigBits (default decimal_to_binary::default_big_bits), so
  parse(s,x) is unchanged and callers can request a larger exact budget, e.g.
  parse<16384>(s,x) to represent ~1000-digit constants. The round-up bigint now
  honors BigBits (was hardcoded to the default).
- Size target_bits overflow-safely from the scanned literal: compute the
  effective decimal exponent and significant-digit count, and cap target so the
  convert shift stays within BigBits. A request beyond the safe ceiling is now
  correctly rounded to that ceiling instead of returning garbage.

Forward declaration in efloat_fwd.hpp carries the BigBits default (it is what
efloat::assign() sees); efloat_fwd.hpp now includes decimal_to_binary.hpp for
default_big_bits.

Verified: default parse of short/long pi at precision 256..3400 now returns the
correct value (was ~0 at >=2040); parse<16384> of a 1000-digit pi matches
efloat_pi<128>() to ~1000 digits, and parse<16384>("0.1")*10 == 1 to ~3300 bits.
New test elastic/efloat/conversion/parse_precision.cpp; all 22 existing efloat
regression tests pass on gcc 13.3.0 and clang 18.1.3.

Resolves #1141

* fix(efloat): budget parse() for positive exponents too (CodeRabbit #1144)

The overflow-safe target ceiling ... (continued)

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

10 existing lines in 2 files now uncovered.

49476 of 58413 relevant lines covered (84.7%)

6874568.46 hits per line

Coverage Regressions

Lines Coverage ∆ File
8
93.95
-0.47% include/sw/universal/number/cfloat/cfloat_impl.hpp
2
89.78
-0.55% include/sw/universal/number/posito/posito_impl.hpp
Jobs
ID Job ID Ran Files Coverage
1 29657033445.1 18 Jul 2026 07:43PM UTC 695
84.7
GitHub Action Run
Source Files on build 29657033445
  • Tree
  • List 695
  • Changed 5
  • Source Changed 1
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #29657033445
  • 8cbfe94e on github
  • Prev Build on main (#29654787094)
  • Next Build on main (#29657734573)
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