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

stillwater-sc / universal / 26350396300
85%
master: 84%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 24 May 2026 03:38AM UTC
Jobs 1
Files 657
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

24 May 2026 03:06AM UTC coverage: 83.966% (-0.002%) from 83.968%
26350396300

push

github

web-flow
fix(ereal): IEEE 754 division-by-zero + special values (#968) (#970)

ereal division routed straight into expansion_quotient (= e *
reciprocal(f)), which has no special-value handling: reciprocal(0) returns
Inf, then a * Inf renormalized to NaN, and any zero operand collapsed to a
positive +0 limb. So finite/0 gave NaN (not signed Inf), 0/0 gave +0 (not
NaN), signed-zero quotients lost their sign, and EREAL_THROW_ARITHMETIC_
EXCEPTION was never consulted.

Add apply_ieee754_div_special_values(), a sibling to the add/mul handlers,
and apply it in operator/= before the Newton-reciprocal quotient. The sign
of a quotient is signbit(a) XOR signbit(b), including for zero and infinite
results:

  NaN / x, x / NaN       = NaN
  x / 0 (x != 0)         = Inf, sign = a ^ b   (or throw, see below)
  0 / 0                  = NaN
  Inf / Inf              = NaN
  Inf / finite-nonzero   = Inf, sign = a ^ b
  finite / Inf           = 0,   sign = a ^ b
  0 / finite-nonzero     = 0,   sign = a ^ b

When EREAL_THROW_ARITHMETIC_EXCEPTION is enabled, a zero divisor throws
ereal_divide_by_zero (the exception type already existed but was unwired in
operator/=). operator/=(double) now delegates to the ereal overload so the
table applies uniformly (matches operator*=/-=).

division.cpp: the previously gated divide-by-zero block is un-gated and
extended -- NaN propagation, the full IEEE divide-by-zero table, infinity
operands, and signed-zero quotients, plus a throw-mode block guarded by
EREAL_THROW_ARITHMETIC_EXCEPTION.

Verified on gcc-13 and clang-18: division foundational + fuzz pass in both
default and throw modes; addition/subtraction/multiplication unchanged.

Resolves #968

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

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

7 existing lines in 3 files now uncovered.

47314 of 56349 relevant lines covered (83.97%)

5359054.17 hits per line

Coverage Regressions

Lines Coverage ∆ File
5
50.45
-4.5% include/sw/universal/verification/posit_test_suite_randoms.hpp
1
95.62
-0.34% include/sw/universal/internal/expansion/expansion_ops.hpp
1
80.58
-0.22% include/sw/universal/number/posit1/specialized/posit_16_1.hpp
Jobs
ID Job ID Ran Files Coverage
1 26350396300.1 24 May 2026 03:38AM UTC 657
83.97
GitHub Action Run
Source Files on build 26350396300
  • Tree
  • List 657
  • Changed 5
  • Source Changed 1
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26350396300
  • 7c37b45d on github
  • Prev Build on main (#26349907074)
  • Next Build on main (#26351253549)
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