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

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

Build:
Build:
LAST BUILD BRANCH: fix/fixpnt-quire-resolve-saturates
DEFAULT BRANCH: master
Ran 03 Nov 2026 04:30PM UTC
Jobs 1
Files 773
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

03 Nov 2026 03:56PM UTC coverage: 88.517% (+0.03%) from 88.486%
41669118951

push

github

web-flow
fix(fixpnt,integer,einteger,edecimal,erational): division by zero throws by default (#1907)

fixpnt, integer, einteger, edecimal and erational reported a division by
zero only through <TYPE>_THROW_ARITHMETIC_EXCEPTION, which defaults to 0:
a line on stderr and an ordinary value. Generic code (an MTL5 solver, any
algorithm templated on the number type) could not tell that value from a
real result.

Each type now has <TYPE>_THROW_DIVIDE_BY_ZERO. It defaults to 1, or follows
<TYPE>_THROW_ARITHMETIC_EXCEPTION when the application set that one, so an
existing explicit opt-out keeps working. The older macro keeps its default
of 0 for the other errors (the integer WholeNumber/NaturalNumber domain
checks, the fixpnt quire policy), so only division by zero changes.

With the exception off, every type returns a defined value without
printing anything:
- fixpnt: maxpos/maxneg by the dividend's sign (Saturate), 0 (Modulo)
- integer, einteger, edecimal: quotient and remainder 0, in every entry
  point (operators, reduce(), remainder(), idiv(), decint_divide())
- erational: NaN, the 0/0 state isnan() reports

Defects fixed along the way:
- integer/einteger reduce() returned early, leaving the outputs as they
  were; idiv() returned an idiv_t with indeterminate limbs
- edecimal::decint_divide carried on into the long division with b = 0
- erational normalize() set 0/0 and then ran its GCD loop with a zero
  divisor; it now settles on 0/0 and returns, without throwing, so
  arithmetic on a NaN carries the NaN along
- einteger: a zero divisor held in several limbs (setblock does not trim)
  was not seen as zero
- erational: a NaN converted to an integer called std::terminate out of
  the noexcept conversion operators; it now gives 0
- erational: an operand with a zero denominator, on either side, divides
  to NaN, and NaN / 0 is NaN through erational_divide and operator/=
- erational: the constant-initialized default (both digit vectors empty)
  is zero, not NaN, in i... (continued)

58 of 60 new or added lines in 4 files covered. (96.67%)

14 existing lines in 4 files now uncovered.

56204 of 63495 relevant lines covered (88.52%)

8941835.19 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
95.13
3.71% include/sw/universal/number/erational/erational_impl.hpp

Coverage Regressions

Lines Coverage ∆ File
9
94.03
-0.3% include/sw/universal/number/integer/integer_impl.hpp
2
96.26
-0.17% include/sw/universal/number/edecimal/edecimal_impl.hpp
2
80.49
-4.88% include/sw/universal/verification/test_suite_exceptions.hpp
1
93.16
1.71% include/sw/universal/verification/correctly_rounded_reference.hpp
Jobs
ID Job ID Ran Files Coverage
1 41669118951.1 03 Nov 2026 04:30PM UTC 773
88.52
GitHub Action Run
Source Files on build 41669118951
  • Tree
  • List 773
  • Changed 8
  • Source Changed 5
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #41669118951
  • f0066d9d on github
  • Prev Build on main (#41557127986)
  • Next Build on main (#41715140830)
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