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

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

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

06 May 2026 12:10AM UTC coverage: 83.949% (+0.006%) from 83.943%
25409308132

push

github

web-flow
feat(unum1): full constexpr support across remaining surface (#822)

Follow-up to #743 / PR #820 (which scoped itself to construction and
bitwise ops).  Promote the rest of the unum Type I user-facing surface
to constexpr / CONSTEXPRESSION.

Promoted in this PR

  * to_double / to_float / to_long_double -- replaced std::ldexp(1.0, n)
    in the per-bit fraction accumulator and the final scale-up with
    sw::math::constexpr_math::exp2(double(n)).  cm::exp2 is exact at
    integer arguments via direct IEEE 754 bit construction in
    detail::pow2, so the value-domain semantics are preserved bit-for-
    bit and the round-trip path becomes constant-evaluable.
  * operator double / operator float / operator long double -- thin
    wrappers, marked constexpr.
  * Friend comparison operators (==, !=, <, <=, >, >=) marked constexpr
    -- they delegate through to_double, which is now constexpr.
  * Compound arithmetic (+= -= *= /=) marked CONSTEXPRESSION.  The
    UNUM_THROW_ARITHMETIC_EXCEPTION branch in operator/= is now guarded
    under !std::is_constant_evaluated() so the setnar fallback is
    reachable at constant evaluation.
  * Increment / decrement (++ --) marked CONSTEXPRESSION; the
    minpos-step calculation switches from std::ldexp(1.0, -(1<<esize()))
    to sw::math::constexpr_math::exp2(-double(1<<esize())).
  * Negation (operator-) was already pure bit math; marked constexpr.
  * Binary arithmetic free functions (+, -, *, /) marked CONSTEXPRESSION.

Test coverage in elastic/unum/constexpr.cpp

  * Power-of-two round-trip exactness: u22(2.0) -> double -> 2.0,
    u22(4.0) -> 4.0, u22(-0.5) -> -0.5, u22(0.0) -> 0.0.
  * NaN round-trip: u22(NaN) -> double NaN (verified via x != x).
  * to_float thin-wrapper smoke.
  * Comparison operators at constant evaluation, including NaN
    semantics (every relational comparison except != returns false).
  * Arithmetic at constant evaluation: u22 a + b, a - b, a * b, a / b
    with power-of-two values th... (continued)

21 of 23 new or added lines in 1 file covered. (91.3%)

3 existing lines in 1 file now uncovered.

45875 of 54646 relevant lines covered (83.95%)

6476062.9 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
93.31
-0.66% include/sw/universal/number/unum/unum_impl.hpp

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 25409308132.1 06 May 2026 12:38AM UTC 648
83.95
GitHub Action Run
Source Files on build 25409308132
  • 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 #25409308132
  • d6bcd556 on github
  • Prev Build on main (#25407703044)
  • Next Build on main (#25641836814)
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