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

stillwater-sc / universal / 26001208466
84%
master: 84%

Build:
Build:
LAST BUILD BRANCH: fix/issue-ci-ereal-regression-runtime
DEFAULT BRANCH: master
Ran 17 May 2026 08:28PM UTC
Jobs 1
Files 652
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

17 May 2026 08:00PM UTC coverage: 84.083% (+0.03%) from 84.051%
26001208466

push

github

web-flow
feat(hfloat): implement parse() for decimal string input (#849) (#859)

* feat(hfloat): implement parse() for decimal string input (Resolves #849)

hfloat::parse was a stub that returned false unconditionally. This
implements it via the route established in Phase B2/C/D of #835:
  decimal_to_binary::convert -> distill<1> -> double -> convert_ieee754

That gives bit-exact correctly-rounded conversion for the hfloat
configurations whose precision fits in a double (24 fbits for
hfloat_short, 56 fbits for hfloat_long). Wider hfloat<28,*> sees the
same precision loss the existing operator=(double) path already has;
upgrading that to a wider distill<N> is a separate enhancement.

The hfloat encoding (truncation rounding, overflow saturation to
maxpos/maxneg, no NaN/Inf) is preserved by routing through the
existing convert_ieee754 entry point.

Special-value handling:
- nan / inf / infinity tokens REJECTED (return false). hfloat has no
  NaN or Inf encoding; silently mapping these would be wrong.
- Empty string, "+", "-", ".", "e10" REJECTED (no-digit guard).
- Trailing junk REJECTED (1.5abc, 1.5.0, 1e, 1ea).

operator>> hygiene:
- Extraction guard: `if (!(istr >> txt)) return istr;`
- setstate(std::ios::failbit) on parse failure (in addition to the
  existing cerr diagnostic).

Tests (static/float/hfloat/conversion/string_parse.cpp):
- hfloat_short and hfloat_long: canonical decimals match constructor
- nan / inf / infinity tokens (all 11 spellings) rejected
- Overflow saturation: parse("1e100") -> maxpos, parse("-1e100") -> maxneg
- Malformed input rejection (11 cases)
- operator>> failbit on bad token + on EOF

Verified on gcc (build_ci) and clang (build_ci_clang): hfloat_string_parse
PASS, hfloat_api regression PASS.

Resolves #849

* fix(hfloat): unify mantissa->hex path, address user + CodeRabbit round-1 review on PR #859

Three issues addressed:

1. The original PR description claimed "hfloat_long (56 fbits) -- fully
   exact (well within double's 53)... (continued)

85 of 88 new or added lines in 1 file covered. (96.59%)

19 existing lines in 4 files now uncovered.

46682 of 55519 relevant lines covered (84.08%)

6423600.74 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
92.22
5.35% include/sw/universal/number/hfloat/hfloat_impl.hpp

Coverage Regressions

Lines Coverage ∆ File
11
31.07
-3.93% include/sw/universal/verification/test_suite_randoms.hpp
5
50.45
-4.5% include/sw/universal/verification/posit_test_suite_randoms.hpp
2
89.78
-0.55% include/sw/universal/number/posito/posito_impl.hpp
1
81.25
0.45% include/sw/universal/number/posit1/specialized/posit_16_1.hpp
Jobs
ID Job ID Ran Files Coverage
1 26001208466.1 17 May 2026 08:28PM UTC 652
84.08
GitHub Action Run
Source Files on build 26001208466
  • Tree
  • List 652
  • Changed 7
  • Source Changed 1
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26001208466
  • b7a64192 on github
  • Prev Build on main (#25994639561)
  • Next Build on main (#26002163594)
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