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

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

Build:
Build:
LAST BUILD BRANCH: feat/precision-profiles
DEFAULT BRANCH: master
Ran 13 Sep 2026 03:33AM UTC
Jobs 1
Files 649
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 02:53AM UTC coverage: 85.663% (-0.003%) from 85.666%
34734155409

push

github

web-flow
refactor(hfloat): split hfloat into core / manipulators / iostream (#1334) (#1447)

Third type of Phase 2 group 5a (#1444).

    core.hpp        59,518 lines / 304 headers / 0 I/O-family
    hfloat.hpp      77,199 lines / 385 headers / 5 I/O-family  (was 78,566 / 399 / 5)

Zero I/O-family headers is met. Under-45,000 lines is not, and reporting the
number rather than moving the bar: utility/decimal_to_binary.hpp, which parse()
converts through, is 57,369 lines on its own (already 0 I/O), so this core is
within 2,200 lines of its single largest dependency. Same shape as dfloat
(#1446); the ceiling belongs to the substrate.

str() had to be reimplemented, and that is this PR's one real change

hfloat's str() is core surface -- operator<< formats through it -- but unlike
dfloat's, which concatenates, it built its result with a stringstream:

    std::stringstream ss;
    if (nrDigits > 0) ss << std::setprecision(nrDigits);
    ss << d;

That single function was the only reason this core would have needed <sstream>.
std::ostream's `defaultfloat` presentation of a double IS printf's %g at the
stream's precision (which defaults to 6), so it now reaches the same formatter
through snprintf("%.*g") -- the <cstdio> idiom Phase 0 adopted -- with a
two-pass call so arbitrary precision still works and a clamp on the size_t to
int narrowing.

Verified, not assumed: a standalone harness compared the two formulations over
604,742 (value, precision) pairs -- the full double exponent range from 1e-320
to 1e308, 40 mantissas per decade, precisions 0 to 60, plus the boundary values
-- with ZERO mismatches on gcc and clang. The differential below then compares
184,176 further str() renderings in situ.

One observable difference remains and is deliberate: a stringstream carries the
global locale while snprintf uses the C locale, so a program that calls
std::locale::global with a non-C numeric facet would previously have seen a
localised decimal separator here and now will ... (continued)

56 of 56 new or added lines in 3 files covered. (100.0%)

10 existing lines in 1 file now uncovered.

43194 of 50423 relevant lines covered (85.66%)

7175037.37 hits per line

Coverage Regressions

Lines Coverage ∆ File
10
31.43
-3.57% include/sw/universal/verification/test_suite_randoms.hpp
Jobs
ID Job ID Ran Files Coverage
1 34734155409.1 13 Sep 2026 03:33AM UTC 649
85.66
GitHub Action Run
Source Files on build 34734155409
  • Tree
  • List 649
  • Changed 5
  • Source Changed 3
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #34734155409
  • b6ce91d9 on github
  • Prev Build on main (#34733638818)
  • Next Build on main (#34734670226)
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