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

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

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 25 Apr 2026 01:15PM UTC
Jobs 1
Files 633
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

25 Apr 2026 12:48PM UTC coverage: 84.343% (-0.04%) from 84.378%
24931269268

push

github

web-flow
feat(cfloat): full constexpr arithmetic, comparison, and conversion-out (#756)

* feat(cfloat): full constexpr arithmetic, comparison, and conversion-out

Resolves #719. cfloat joins posit (#718) as a fully constexpr arithmetic
type. After this PR:

  constexpr cfloat<32, 8, std::uint32_t, true, true, false> a(2.0), b(3.0);
  constexpr auto sum  = a + b;     // works
  constexpr auto prod = a * b;     // works
  constexpr auto neg  = -a;        // works
  static_assert(a < b);            // works
  static_assert(float(prod) == 6.0f);  // works (operator float() now constexpr)

Smaller PR than posit #718 because cfloat was already further along:
  - construction (int + float + double + long double): already constexpr
    from #717-era work (BIT_CAST_CONSTEXPR convert_ieee754)
  - normalizeAddition / normalizeMultiplication / normalizeDivision:
    already constexpr
  - if (_trace_X) std::cout: already if constexpr (cfloat got it right
    from the start; posit needed conversion in #718)

Promoted to constexpr in this PR:
  cfloat::operator-() (unary), operator++, --, +=, -=, *=, /=
  cfloat::reciprocal()
  free convert(blocktriple, cfloat) (was /*constexpr*/ comment marker)
  free binary operator+ / - / * / / overloads:
    cfloat-cfloat, cfloat-float, cfloat-double,
    cfloat-int, cfloat-unsigned, cfloat-long-long, cfloat-unsigned-long-long
    (52 free binary operators total)
  free comparison operator==, !=, <, >, <=, >= overloads:
    cfloat-cfloat, cfloat-float, cfloat-double, cfloat-long-double
    (36 free comparison operators total)
  matching friend declarations updated
  to_native<TargetFloat>(), to_int(), to_long(), to_long_long()
  conversion-out operator int / long / long long / float / double / long double

Tests: static/float/cfloat/api/constexpr.cpp gets a #if BIT_CAST_IS_CONSTEXPR
guarded block exercising:
  constexpr binary operators: a+b, a-b, a*b, b/a, -a
  constexpr compound via lambda: t += rhs, t *= rhs
  static_assert on compar... (continued)

84 of 87 new or added lines in 1 file covered. (96.55%)

18 existing lines in 2 files now uncovered.

44939 of 53281 relevant lines covered (84.34%)

6441197.0 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
93.48
-0.52% include/sw/universal/number/cfloat/cfloat_impl.hpp

Coverage Regressions

Lines Coverage ∆ File
10
31.43
-3.57% include/sw/universal/verification/test_suite_randoms.hpp
8
93.48
-0.52% include/sw/universal/number/cfloat/cfloat_impl.hpp
Jobs
ID Job ID Ran Files Coverage
1 24931269268.1 25 Apr 2026 01:15PM UTC 633
84.34
GitHub Action Run
Source Files on build 24931269268
  • Tree
  • List 633
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #24931269268
  • 8e93c5e6 on github
  • Prev Build on main (#24922868498)
  • Next Build on main (#24934415493)
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