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

stillwater-sc / universal / 40617388048
89%
master: 84%

Build:
Build:
LAST BUILD BRANCH: fix/issue-2111-fixpnt
DEFAULT BRANCH: master
Ran 28 Oct 2026 02:10AM UTC
Jobs 1
Files 767
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

28 Oct 2026 01:50AM UTC coverage: 88.223% (-0.02%) from 88.238%
40617388048

push

github

web-flow
feat(efloat): efloat_constant, constexpr variables at every precision (#1851)

Phase 4 of #1819. An efloat whose limbs fit the inline buffer (up to
EFLOAT_INLINE_LIMBS 64-bit limbs, 512 bits by default) is already a constexpr
variable; past it the limbs are on the heap, which a constexpr variable cannot keep.

efloat_constant<nlimbs> holds an efloat<nlimbs> value -- state, sign, exponent,
precision and limbs -- in an array of (nlimbs + 1) / 2 limbs, so it is a constexpr
variable at every precision, and converts back into the same efloat:

    constexpr efloat_constant<32> pi = efloat_pi<32>();
    static_assert(pi > 3 && pi < efloat<32>(22) / 7);
    efloat<32> x = pi;   // bit for bit efloat_pi<32>()

It compares with itself, with efloat<nlimbs> and with native types (exactly, long
double included where it is wider than double), its + - * / and unary - return
the efloat result, and it has efloat's selectors. A value with more limbs than the
array is rounded to nlimbs * 32 bits, as set_precision() rounds; a special value is
held in canonical form.

Two efloat bugs found on the way:
- operator>= was !(a < b), so NaN >= x was true; it is b < a || a == b now.
- operator=(char) took the unsigned path, so char(-1) became 2^64 - 1 where plain
  char is signed; it converts as signed or unsigned char, as the platform has it.

elastic/efloat/api/constexpr_constant.cpp checks inline constexpr variables, round
trips of 10 values (fractions, a 64-bit integer, both zeros, infinities and NaNs) at
32 to 3300 bits against the run time, rounding, comparisons, arithmetic, long double
past double's range, and pi, e and phi at 1024 bits (3300 at level 2).

Resolves #1819

BEHAVIOUR-CHANGE: efloat's operator>= (efloat with efloat or double) returns false when an operand is NaN; it returned true
BEHAVIOUR-CHANGE: efloat(char(-1)) is -1 where plain char is signed, as on x86; it was 2^64 - 1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

41 of 57 new or added lines in 2 files covered. (71.93%)

1 existing line in 1 file now uncovered.

55293 of 62674 relevant lines covered (88.22%)

8792826.06 hits per line

Uncovered Changes

Lines Coverage ∆ File
16
71.43
include/sw/universal/number/efloat/efloat_constant.hpp

Coverage Regressions

Lines Coverage ∆ File
1
97.04
-0.06% include/sw/universal/number/cfloat/cfloat_impl.hpp
Jobs
ID Job ID Ran Files Coverage
1 40617388048.1 28 Oct 2026 02:10AM UTC 767
88.22
GitHub Action Run
Source Files on build 40617388048
  • Tree
  • List 767
  • Changed 3
  • Source Changed 1
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #40617388048
  • eaa6924d on github
  • Prev Build on main (#40607525589)
  • Next Build on main (#40630929533)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc