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

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

Build:
Build:
LAST BUILD BRANCH: fix/issue-ci-ereal-regression-runtime
DEFAULT BRANCH: master
Ran 04 May 2026 10:59PM 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

04 May 2026 10:31PM UTC coverage: 84.061% (-0.05%) from 84.112%
25347143147

push

github

web-flow
feat(e8m0): full constexpr support across all operators (#810)

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

Promotes e8m0 (8-bit exponent-only OCP scaling factor used by mxblock /
mxfloat / nvblock) to fully constexpr across construction, assignment,
comparison, and conversion.  e8m0 has no fraction (no rounding logic
beyond round-to-nearest-power-of-2 on float input) and no arithmetic
operators (would be log-domain), so the surface is contained.  Part of
Epic #723.

What changed
------------

include/sw/universal/number/e8m0/e8m0_impl.hpp:
  * Native-type ctors and assignment operators (float, double, int,
    unsigned) marked constexpr.
  * Conversion operators (operator float / double / int) marked
    constexpr.
  * Increment / decrement (++ --) marked constexpr (saturating at
    encoding 254 / 0).
  * Comparison operators (== != < <= > >=) marked constexpr;
    NaN-aware semantics preserved (NaN comparisons return false).

  * to_float() rewritten constexpr-safe via direct IEEE 754 bit
    construction (matches std::ldexp(1.0f, encoding - 127) bit-exactly):
      - encoding 1..254 -> normal float, exp_field = encoding (bias 127
        matches), mantissa = 0
      - encoding 0      -> 2^-127, subnormal float with mantissa MSB set
        (bit pattern 0x00400000)
      - encoding 255    -> NaN via numeric_limits<float>::quiet_NaN()
    Runtime path retains std::ldexp via std::is_constant_evaluated()
    dispatch for performance.

  * from_float() rewritten constexpr-safe:
      - Replaced std::isinf with numeric_limits<float>::max() bracket
      - Replaced std::log2 + std::round with bit-level extraction:
        rawExp gives the biased exponent (which IS the e8m0 encoding,
        modulo rounding), rawFrac >= (sqrt(2) - 1) * 2^23 ~= 3474676
        triggers round-up to the next power of 2.
      - Subnormal floats (rawExp == 0) coarsely clamped to encoding 0
        in the constexpr path; runtime retains exact log2-based
        ... (continued)

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

14 existing lines in 4 files now uncovered.

45814 of 54501 relevant lines covered (84.06%)

6492050.03 hits per line

Uncovered Changes

Lines Coverage ∆ File
19
68.83
-20.82% include/sw/universal/number/e8m0/e8m0_impl.hpp

Coverage Regressions

Lines Coverage ∆ File
8
93.48
-0.48% include/sw/universal/number/cfloat/cfloat_impl.hpp
3
81.25
-0.67% include/sw/universal/number/posit1/specialized/posit_16_1.hpp
2
89.8
-0.57% include/sw/universal/number/posito/posito_impl.hpp
1
68.83
-20.82% include/sw/universal/number/e8m0/e8m0_impl.hpp
Jobs
ID Job ID Ran Files Coverage
1 25347143147.1 04 May 2026 10:59PM UTC 648
84.06
GitHub Action Run
Source Files on build 25347143147
  • Tree
  • List 648
  • Changed 4
  • Source Changed 1
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25347143147
  • 897c0a95 on github
  • Prev Build on main (#25330596259)
  • Next Build on main (#25352381793)
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