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

stillwater-sc / universal / 34785019544
86%
master: 84%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 13 Sep 2026 10:17PM UTC
Jobs 1
Files 667
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

13 Sep 2026 09:50PM UTC coverage: 85.694% (-0.02%) from 85.716%
34785019544

push

github

web-flow
fix(dfloat): parse counts significant digits, not digit characters (#1489)

dfloat::assign(), which parse() and operator>> use, kept the first ndigits digit
characters of the input as the significand and got the scale wrong three ways:

- Leading zeros used up the precision. decimal32 "0.0001234567" read as 1.23e-8,
  "0.000001234567" as 1e-12, and "0000000123" as 0.
- A digit past the precision after the decimal point still moved the exponent,
  although it was never stored. decimal32 "1.23456789" read as 0.01234567, and
  "12345678.9" as 1234567. decimal64 "3.14159265358979323846" read as
  3.141592653589793e-5.
- The exponent digits accumulated in an int with no bound, so an exponent of ten or
  more digits was signed overflow (UBSan: "999999999 * 10 cannot be represented in
  type 'int'").

The digit loop now keeps value = sig * 10^(decimal_exponent - frac_digits), where
frac_digits counts only the fraction digits appended to sig. Leading zeros take no
precision, and after the point they only set the scale. Digits past the precision
are dropped (truncation, as dfloat rounds everywhere else, #1487): a dropped integer
digit scales the value up, a dropped fraction digit changes nothing. The exponent
saturates at 1000000, beyond every dfloat's range, so such inputs give inf or 0.

New test static/float/dfloat/conversion/parse_digits.cpp (dfloat_parse_digits):
- Random digit strings of 1 to 3*ndigits digits, each written six ways: plain
  positional, with leading integer zeros, with trailing fraction zeros, with the
  point shifted against an explicit exponent, scientific, and integer significand
  with an exponent. Every form must parse to the value truncated to ndigits,
  computed on the digit strings, and parse() must accept it and agree with
  assign(). This runs for dfloat<4>, decimal32 and decimal64 in BID and DPD, and
  decimal128 and dfloat<10> at higher levels.
- The positional round trip of 1.234567e-k for k = 0 to 20, which #1485 proposed.
-... (continued)

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

18 existing lines in 2 files now uncovered.

43591 of 50868 relevant lines covered (85.69%)

7486097.6 hits per line

Coverage Regressions

Lines Coverage ∆ File
10
31.43
-3.57% include/sw/universal/verification/test_suite_randoms.hpp
8
93.06
-0.52% include/sw/universal/number/cfloat/cfloat_impl.hpp
Jobs
ID Job ID Ran Files Coverage
1 34785019544.1 13 Sep 2026 10:17PM UTC 667
85.69
GitHub Action Run
Source Files on build 34785019544
  • Tree
  • List 667
  • Changed 3
  • Source Changed 1
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #34785019544
  • be3b4515 on github
  • Prev Build on main (#34780406903)
  • Next Build on main (#34785139526)
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