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

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

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

11 May 2026 07:38PM UTC coverage: 83.955% (+0.002%) from 83.953%
25692904661

push

github

web-flow
feat(ereal): partial constexpr support (API surface) (#828)

* feat(ereal): partial constexpr support (API surface)

Promote the ereal type's user-facing surface to constexpr where C++20
transient-allocation rules and the use of non-constexpr stdlib helpers
permit.  ereal is a multi-component real implementing Shewchuk's
expansion arithmetic over a std::vector<double> _limb member.

This is the fifth and final elastic-type partial-constexpr PR in the
series, completing the cascade started in PR #820 (unum), #821 (valid),
#824 (edecimal), #825 (efloat), #826 (einteger), #827 (erational).

Promoted (this PR)

  * default constructor: constexpr (NOT noexcept -- the runtime branch's
    push_back can throw bad_alloc, matching the codebase's existing
    convention for ereal modifiers documented at line 234 of the impl)
  * uses is_constant_evaluated() dispatch: at compile time _limb stays
    empty; at runtime push_back(0.0) restores the historical "one zero
    limb" representation that arithmetic relies on
  * defaulted copy / move ctor + assignment operators marked constexpr
  * read-only selectors marked constexpr (with empty-_limb guards so
    the compile-time empty-vector path is well-defined):
      iszero, isone, ispos, isneg, sign, significant, limbs
  * Added defensive empty-_limb guards to the existing non-constexpr
    selectors (isinf, isnan, signbit, scale) so that zero-capacity
    vectors after move don't undefined-behavior on _limb[0]

Limited at constant evaluation today (heap-escape + non-constexpr stdlib)

  * isnan, isinf       - use std::fpclassify (not constexpr in C++20)
  * signbit            - uses std::signbit
  * scale              - uses sw::universal::scale (depends on stdlib)
  * Native-type ctors / operator= - convert_* allocate
  * Modifiers          - clear() + push_back; heap escape
  * Arithmetic ops     - Shewchuk expansion arithmetic; mutate _limb
  * Comparison ops     - compare_adaptive iterates the expansion
  * C... (continued)

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

3 existing lines in 1 file now uncovered.

45895 of 54666 relevant lines covered (83.96%)

6479967.41 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 25692904661.1 11 May 2026 08:06PM UTC 648
83.96
GitHub Action Run
Source Files on build 25692904661
  • Tree
  • List 648
  • Changed 3
  • Source Changed 1
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25692904661
  • 3a86bdfd on github
  • Prev Build on main (#25665656693)
  • Next Build on main (#25811972750)
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