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

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

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 16 May 2026 10:06PM UTC
Jobs 1
Files 650
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

16 May 2026 09:39PM UTC coverage: 84.015% (+0.05%) from 83.968%
25973636098

push

github

web-flow
feat(posit): route decimal string parse through decimal_to_binary (Phase B2b of #835) (#843)

* feat(posit): route decimal string parse through decimal_to_binary (Phase B2b of #835)

Replaces the std::istringstream double funnel in posit::parse() with a direct
call into the high-precision decimal_to_binary utility shipped in Phase B2a.
For posit configurations whose fraction precision exceeds double's 52 bits
(roughly posit<nbits, *> with nbits > 60), this captures the trailing decimal
precision that the legacy path silently truncated.

Implementation:
- Add #include <universal/utility/decimal_to_binary.hpp>
- Decimal branch of parse() now:
  * Routes "nan" / "inf" / "infinity" tokens (any case, optional sign) to NaR
  * Calls decimal_to_binary::convert with target_mantissa_bits = nbits + 5
  * Copies nbits+4 mantissa bits into a blocksignificand<extractBits>, folds
    the d2b residual guard/sticky into bit[0], and hands off to convert_<>()
    so all rounding happens once in posit's encoding step
- Hex format path (regex match on nbits.esxHEXVALUEp) is unchanged

Tests (static/tapered/posit/conversion/string_parse.cpp):
- posit<32,2>: bit-exact match against posit(double) for canonical inputs
- posit<16,2>: basic decimals
- posit<8,0>: native hex format round-trip, mismatched nbits.es rejected
- posit<32,2>: nan/inf literals (10 spellings) -> NaR
- posit<32,2>: operator>> bad-token handling
- posit<64,3>: exact-in-double inputs round identically; 1e-6 diverges (expected:
  posit<64,3> has ~56 fraction bits, more than double's 52, so the new path
  captures precision the funnel lost)
- posit<128,4>: wide decimal of pi parses to a defined non-zero non-NaR value

Verified on gcc (build_ci) and clang (build_ci_clang): posit_string_parse,
posit_api, posit_assignment, posit_conversion all PASS.

Relates to #835

* fix(posit): address CodeRabbit round-1 review on PR #843

Three actionable items from CR review #1:

1. Add direct <cctype> and <string_view> i... (continued)

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

2 existing lines in 1 file now uncovered.

46235 of 55032 relevant lines covered (84.01%)

6449468.68 hits per line

Coverage Regressions

Lines Coverage ∆ File
2
89.8
-0.57% include/sw/universal/number/posito/posito_impl.hpp
Jobs
ID Job ID Ran Files Coverage
1 25973636098.1 16 May 2026 10:06PM UTC 650
84.01
GitHub Action Run
Source Files on build 25973636098
  • Tree
  • List 650
  • Changed 5
  • Source Changed 1
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25973636098
  • 37b8b697 on github
  • Prev Build on main (#25970426704)
  • Next Build on main (#25979191067)
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