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

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

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 26 Apr 2026 06:38PM UTC
Jobs 1
Files 646
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

26 Apr 2026 06:11PM UTC coverage: 84.328% (+0.05%) from 84.282%
24963550987

push

github

web-flow
feat(lns): full constexpr support across all operators (#776)

* feat(lns): full constexpr support across all operators

Promotes lns<nbits, rbits, BlockType> to fully constexpr across all
user-facing operators. Joins integer (#720), posit (#718), cfloat (#719),
bfloat16 (#725), and fixpnt (#721) as a fully constexpr-compliant
Universal type.

The hard prerequisite -- compile-time log2/exp2/pow/sqrt/log/exp -- is
the sw::math::constexpr_math facility that just landed in Epic #763.
With those in place, the lns work is mostly mechanical:

lns_impl.hpp changes:
  - #include <math/constexpr_math.hpp>
  - convert_ieee754: std::log2 -> sw::math::constexpr_math::log2
    (cm only has float/double overloads; long double routes through
    double, lossy at the long-double tail but well below lns precision
    which has at most 64 bits of significand anyway)
  - to_ieee754: std::pow(2, value) -> sw::math::constexpr_math::exp2(value)
    (more direct fit than pow with constant base; same long-double
    routing as above)
  - convert_ieee754 Saturating branch: std::abs -> ternary
    (constexpr-safe, avoids a non-constexpr std::abs call)
  - operator+=, -=, *=, /= and double-overloads: add constexpr
  - operator++, --, postfix ++(int), --(int): add constexpr
  - operator*= / /= Saturating branches: drop `static` from
    `static constexpr ExponentBlockBinary` declarations -- `static
    constexpr` inside a constexpr function is C++23-only (would need
    -std=c++2b) and Universal targets C++20

Add/sub still use the placeholder double-trip arithmetic
(`double(*this) + double(rhs)` -- the `// TODO: native implementation`
comment dates to 2017). Now that both casts are constexpr-callable, the
double-trip works at compile time. The proper Gauss log-add formula
log2(1 + 2^(b-a)) is still a future native-implementation task,
unrelated to constexpr support.

Divide-by-zero throw is gated under LNS_THROW_ARITHMETIC_EXCEPTION;
default (=0) returns NaN encoding, which is ... (continued)

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

45493 of 53948 relevant lines covered (84.33%)

6361621.7 hits per line

Jobs
ID Job ID Ran Files Coverage
1 24963550987.1 26 Apr 2026 06:38PM UTC 646
84.33
GitHub Action Run
Source Files on build 24963550987
  • Tree
  • List 646
  • Changed 5
  • Source Changed 1
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #24963550987
  • 9a7c0243 on github
  • Prev Build on main (#24957906871)
  • Next Build on main (#24968310082)
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