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

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

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 23 May 2026 06:50PM UTC
Jobs 1
Files 656
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

23 May 2026 06:23PM UTC coverage: 84.292% (-0.009%) from 84.301%
26340179255

push

github

web-flow
fix(ereal): apply IEEE 754 rules for Inf/NaN in operator+= / operator-= (#960)

* fix(ereal): apply IEEE 754 rules for Inf/NaN in operator+= / operator-=

Resolves the +Inf + finite -> NaN bug that the corner-case fuzzer in
PR #958 surfaced. Root cause: Shewchuk's expansion arithmetic in
linear_expansion_sum uses two_sum internally; for an Inf operand it
computes Inf - Inf = NaN in the residual extraction path. The leading
limb is correctly +/-Inf but the residual limb is NaN, and
convert_to_ieee754 sums them and returns NaN.

Fix: short-circuit IEEE 754 special-value cases BEFORE the EFT chain
runs. New private member `apply_ieee754_add_special_values(rhs)` sets
*this to the IEEE 754 result and returns true when either operand is
NaN or +/-Inf; otherwise returns false and the existing finite-finite
EFT path runs.

Rules implemented (per IEEE 754-2019):
  NaN + anything           = NaN
  anything + NaN           = NaN
  +Inf + +Inf              = +Inf
  -Inf + -Inf              = -Inf
  +Inf + -Inf              = NaN
  +/-Inf + finite          = +/-Inf
  finite + +/-Inf          = +/-Inf

Subtraction (a - b) is handled as a + (-b); the sign-flip on the RHS
correctly turns +Inf - -Inf into +Inf + +Inf = +Inf rather than the
naive +Inf + -Inf = NaN.

Test updates (elastic/ereal/arithmetic/addition.cpp):
- Un-gated the +Inf + finite assertion that PR #958 deferred behind
  `#if 0 // re-enable when #957 is fixed`.
- Added complementary -Inf + finite, +Inf + +Inf, -Inf + -Inf tests
  to exercise the full Inf-handling matrix.

Validation
- gcc 13.3 debug + release: PASS all 4 LEVELs on addition.cpp; full
  38-test ereal regression PASS.
- clang 18.1 debug + release: same.

Resolves #957

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(ereal): address CodeRabbit review on PR #960

Three findings, all valid:

1. apply_ieee754_add_special_values was in the public section; moved to
   protected (with the other HELPER methods). Caller... (continued)

26 of 26 new or added lines in 1 file covered. (100.0%)

11 existing lines in 2 files now uncovered.

47141 of 55926 relevant lines covered (84.29%)

5264006.31 hits per line

Coverage Regressions

Lines Coverage ∆ File
8
93.64
-0.47% include/sw/universal/number/cfloat/cfloat_impl.hpp
3
81.25
-0.22% include/sw/universal/number/posit1/specialized/posit_16_1.hpp
Jobs
ID Job ID Ran Files Coverage
1 26340179255.1 23 May 2026 06:50PM UTC 656
84.29
GitHub Action Run
Source Files on build 26340179255
  • Tree
  • List 656
  • Changed 3
  • Source Changed 1
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26340179255
  • d0822bab on github
  • Prev Build on main (#26339545423)
  • Next Build on main (#26341266844)
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