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

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

Build:
Build:
LAST BUILD BRANCH: fix/issue-1002-ereal-highprec-constants
DEFAULT BRANCH: master
Ran 05 May 2026 04:12PM UTC
Jobs 1
Files 648
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

05 May 2026 03:43PM UTC coverage: 83.971% (-0.003%) from 83.974%
25386566044

push

github

web-flow
feat(takum): full constexpr support across all operators (#817)

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

Promote linear takum encoding to fully constexpr across construction,
assignment, arithmetic (+= -= *= /=), comparison (== != < <= > >=),
unary negation, increment / decrement, and IEEE-754 conversion paths.

Key changes in takum_impl.hpp:

* convert_ieee754: replace std::frexp with bit-extraction.  For an
  IEEE 754 normal v = (1 + rawFrac/2^fbits) * 2^(rawExp - bias) the
  takum decomposition is c = rawExp - bias and m_real = rawFrac/2^fbits
  directly.  Subnormals normalize via a bounded leading-zero shift.
  Long double routes through double's encoding when extractFields uses
  LONG_DOUBLE_DOWNCAST.

* to_ieee754: replace std::exp2(c) with sw::math::constexpr_math::exp2,
  which is exact at integer arguments via direct IEEE 754 bit
  construction in detail::pow2.

* All in-class member operators (=, +=, -=, *=, /=, ++, --, unary -,
  out-conversion to int/long/long long/float/double/long double) marked
  CONSTEXPRESSION (constexpr when sw::bit_cast is constexpr) or
  constexpr (pure bit-math).

* Friend comparison operators (==, !=, <, <=, >, >=) and binary
  arithmetic operators (+, -, *, /) on takum<>: marked constexpr /
  CONSTEXPRESSION as appropriate.  Comparisons reduce to signed integer
  comparison on the raw two's-complement bits and stay constexpr.

* characteristic() / scale() / find_dr() promoted to constexpr.

* operator/=: throw guarded under !std::is_constant_evaluated() so the
  setnar fallback branch is reachable at constant evaluation when
  TAKUM_THROW_ARITHMETIC_EXCEPTION is enabled.

New static/tapered/takum/api/constexpr.cpp covers:

* Static accessor invariants (nbits, rbits, overhead, dr_bits, max_r,
  maxCharBits)
* SpecificValue construction (zero / maxpos / maxneg / nar)
* Round-trip conversion: int -> takum -> double, float -> takum ->
  double, double -> takum -> double, NaN -> NaR
* Arithmetic a... (continued)

51 of 59 new or added lines in 1 file covered. (86.44%)

7 existing lines in 2 files now uncovered.

45854 of 54607 relevant lines covered (83.97%)

6483724.36 hits per line

Uncovered Changes

Lines Coverage ∆ File
8
95.47
-2.14% include/sw/universal/number/takum/takum_impl.hpp

Coverage Regressions

Lines Coverage ∆ File
4
89.24
-1.13% include/sw/universal/number/posito/posito_impl.hpp
3
80.58
-0.67% include/sw/universal/number/posit1/specialized/posit_16_1.hpp
Jobs
ID Job ID Ran Files Coverage
1 25386566044.1 05 May 2026 04:12PM UTC 648
83.97
GitHub Action Run
Source Files on build 25386566044
  • 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 #25386566044
  • 9bb84413 on github
  • Prev Build on main (#25377027626)
  • Next Build on main (#25389104901)
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