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

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

Build:
Build:
LAST BUILD BRANCH: fix/issue-1002-ereal-highprec-constants
DEFAULT BRANCH: master
Ran 05 May 2026 01:34AM 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

05 May 2026 01:07AM UTC coverage: 84.016% (-0.05%) from 84.061%
25352381793

push

github

web-flow
feat(microfloat): full constexpr support across all operators (#811)

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

Promotes microfloat (8-bit float family: e4m3, e5m2, e2m1) to fully
constexpr across construction, assignment, arithmetic, comparison, and
conversion.  microfloat is its own implementation (not a cfloat alias as
the issue body suggested -- 845 lines of dedicated code), so the
promotion surface is non-trivial.  Part of Epic #723.

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

include/sw/universal/number/microfloat/microfloat_impl.hpp:
  * All native-type ctors / assignment operators / conversion-out
    operators marked constexpr.
  * Increment / decrement (++ --) marked constexpr.
  * Unary minus, +=, -=, *=, /= marked constexpr (delegate to to_float
    -> arithmetic -> from_float, all of which are constexpr after the
    rewrite below).
  * Comparison operators (== != < <= > >=) for microfloat-microfloat,
    microfloat-float, and float-microfloat marked constexpr.
  * operator>= changed from `!operator<` to `operator> || operator==`
    -- pre-fix code returned true for any NaN operand because operator<
    returns false for NaN, and !false = true.  Same bug pattern as the
    e8m0 PR #810 CodeRabbit catch.

  * to_float() rewritten via std::is_constant_evaluated() dispatch:
    runtime path keeps std::ldexp; constexpr path uses a new private
    cx_ldexp helper (power-of-2 multiplication loop, bounded by the
    type's exponent range -- at most ~14 iterations for e5m2).  Both
    paths produce bit-identical results because 2.0/0.5 are exactly
    representable in IEEE 754 float.

  * from_float() rewritten via std::is_constant_evaluated() dispatch:
    - std::signbit -> bit_cast<uint32_t>(v) >> 31
    - std::isinf   -> (rawExp == 0xFF && rawFrac == 0)
    - std::frexp   -> IEEE 754 field extraction with subnormal-source
                      leading-zero scan to match frexp's mantissa
                      normalization
    - std::ld... (continued)

52 of 81 new or added lines in 1 file covered. (64.2%)

3 existing lines in 1 file now uncovered.

45820 of 54537 relevant lines covered (84.02%)

6493504.55 hits per line

Uncovered Changes

Lines Coverage ∆ File
29
79.93
-8.13% include/sw/universal/number/microfloat/microfloat_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 25352381793.1 05 May 2026 01:34AM UTC 648
84.02
GitHub Action Run
Source Files on build 25352381793
  • 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 #25352381793
  • e644259f on github
  • Prev Build on main (#25347143147)
  • Next Build on main (#25353499732)
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