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

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

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 21 May 2026 02:43AM UTC
Jobs 1
Files 651
Run time 2min
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

21 May 2026 02:16AM UTC coverage: 84.233% (-0.005%) from 84.238%
26201465878

push

github

web-flow
feat(elreal): Phase B -- rational and string construction with lazy refinement (#884)

* feat(elreal): Phase B -- rational + string construction with lazy refinement

Phase B of epic #873 (resolves #875): adds the construction-from-source
machinery and activates the lazy refinement protocol for rational inputs.

Generator slot promoted from reserved-comment to real member:
- mutable std::function<double(std::size_t)> _generator
- at(k) walks the generator on cache miss, appending to _components
- refine_to(precision_bits) iterates at(0..ceil(p/53))
- An absent generator (e.g. for elreal(double) values) leaves at(k>=depth)
  returning the implicit-zero extension, same as Phase A

Rational constructor elreal(long long p, long long q):
- Component 0: double(p) / double(q) (IEEE-754 rounded)
- Component 1 (via generator): exact residual p - c0 * q computed with
  two_prod + two_sum, divided by q. Exact for |p| < 2^53 (i.e. any
  long long whose absolute value is within the 53-bit double-significand
  envelope); incurs one extra rounding for larger magnitudes.
- Components 2+: 0.0 with a documented limitation. Arbitrary-depth
  refinement via McCleeary long division is deferred to Phase E/F.
- elreal(p, 0) -> NaN; elreal(0, q) -> canonical zero.

String constructor elreal(const std::string&):
- Accepts decimal ("3.14"), scientific ("6.022e23"), and rational ("1/3")
  forms, plus the special tokens nan / inf / infinity (case-insensitive,
  with optional sign).
- The parser normalises decimal / scientific to (p, q) form and delegates
  to the rational constructor. The acceptance criterion of #875 --
  elreal("1/3").at(1) != 0 -- is met because the rational path returns
  a non-trivial correction.
- Overflow fallback: scientific-notation values whose normalised numerator
  or denominator exceeds long long range fall back to a double-precision
  reconstruction (mantissa * pow(10, exp)). The leading component is
  faithful; exact-rational refinement past compon... (continued)

46942 of 55729 relevant lines covered (84.23%)

5272937.48 hits per line

Coverage Regressions

Lines Coverage ∆ File
3
80.58
-0.67% include/sw/universal/number/posit1/specialized/posit_16_1.hpp
Jobs
ID Job ID Ran Files Coverage
1 26201465878.1 21 May 2026 02:43AM UTC 651
84.23
GitHub Action Run
Source Files on build 26201465878
  • Tree
  • List 651
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26201465878
  • 1d96feb8 on github
  • Prev Build on main (#26193851938)
  • Next Build on main (#26202799642)
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