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

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

Build:
Build:
LAST BUILD BRANCH: fix/fixpnt-quire-resolve-saturates
DEFAULT BRANCH: master
Ran 03 Nov 2026 04:31PM UTC
Files 773
Run time 11s
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.1

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)

56204 of 63495 relevant lines covered (88.52%)

8941835.19 hits per line

Source Files on job 41669118951.1
  • Tree
  • List 773
  • Changed 8
  • Source Changed 5
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 41669118951
  • f0066d9d on github
  • Prev Job for on main (#41557127986.1)
  • Next Job for on main (#41715140830.1)
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