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

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

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 18 May 2026 04:30AM 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

18 May 2026 04:02AM UTC coverage: 84.224% (+0.02%) from 84.201%
26012810689

push

github

web-flow
feat(efloat): implement parse() for decimal and scientific literals (#867)

* feat(efloat): implement parse() for decimal and scientific literals

efloat::parse was a stub that always returned false, so operator>>
extracted the token and immediately set failbit -- the elastic
binary float type couldn't ingest any literal.

Implement parse() to:
- route the "nan", "inf", and "infinity" tokens (case-insensitive,
  optional leading sign) to the matching FloatingPointState via new
  public setnan / setinf modifiers
- route every other input through
  sw::universal::decimal_to_binary::convert (Phase B2a, #841) with
  target_mantissa_bits sized to fill efloat's available limb storage
  (nlimbs * 32), capped at 2040 bits to stay under the d2b BigBits
  budget (2048)
- apply round-to-nearest-even using d2b's guard/sticky output; if a
  carry escapes the top of the mantissa, shift right and bump the
  binary scale
- pack the resulting normalized bigint mantissa into efloat's
  uint32_t limbs MSB-first: _limb[0] bit 31 holds the hidden bit,
  _limb[i] bit 0 holds mantissa bit (target - 32(i+1))

New efloat modifiers (public API):
- setinf(bool sign = false)
- setnan(bool quiet = true)
- setsign(bool)
- setexponent(std::int64_t)
- setlimb(unsigned, std::uint32_t)

operator>> hygiene (failbit + extraction guard) was shipped in #858;
the test file now pins both the new parse contract and that hygiene.

Test (elastic/efloat/conversion/string_parse.cpp) extended to 10 groups:
- canonical normals (1, -1, 2, 4, 0.5, 0.25, 1.5, -2.5) checked
  bit-exactly against hand-derived patterns
- scientific notation across +/-100 decimal exponent
- 3.14 cross-checked against the IEEE-754 double bit pattern after
  reducing efloat's 64-bit RTNE significand to 53 bits with RTNE
- signed zero (+0, -0, 0e10, -0.0e5)
- nan/inf/infinity case-insensitive
- malformed reject (empty, abc, 1.2.3, 1e, ., 1e3.5, 42x, 0xFF,
  nann, inff)
- operator>> failbit / success in whitespace / empty st... (continued)

66 of 68 new or added lines in 1 file covered. (97.06%)

8 existing lines in 1 file now uncovered.

46827 of 55598 relevant lines covered (84.22%)

6412919.12 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
91.93
2.74% include/sw/universal/number/efloat/efloat_impl.hpp

Coverage Regressions

Lines Coverage ∆ File
8
93.63
-0.47% include/sw/universal/number/cfloat/cfloat_impl.hpp
Jobs
ID Job ID Ran Files Coverage
1 26012810689.1 18 May 2026 04:30AM UTC 652
84.22
GitHub Action Run
Source Files on build 26012810689
  • Tree
  • List 652
  • Changed 3
  • Source Changed 1
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26012810689
  • 8b513b84 on github
  • Prev Build on main (#26011539088)
  • Next Build on main (#26013934103)
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