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

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

Build:
Build:
LAST BUILD BRANCH: feat/issue-2125-lns-exact-reference
DEFAULT BRANCH: master
Ran 19 Oct 2026 04:05AM UTC
Jobs 1
Files 754
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

19 Oct 2026 03:40AM UTC coverage: 87.443% (+0.001%) from 87.442%
39195828533

push

github

web-flow
fix(integer): reduce() divides with idiv, so multi-block divisors are right and never trap (#1752)

integer<>::reduce(a, b, r) carried a block-digit Knuth division of its own,
wrong for every divisor wider than one block (2000 of 2000 random cases on
integer<128> with 8-, 16- and 32-bit blocks, both signs) and able to trap
with SIGFPE: it normalized by the leading zeros of the signed divisor rather
than its magnitude, shifted a block by its full width when no normalization
was needed, hard-coded 32-bit blocks, inverted Knuth's correction test, and
printed to stderr on add-back.

Several blocks now go through idiv, the long division behind / and %
(limb::divide since #1744); the native single-block path and the zero
checks are kept, and the result is formed before it is stored, so r or
*this may alias an operand. The only caller in the tree, einteger's decimal
printing, divides by a single-block power of ten and was not affected.

Tests: static/integer/binary/arithmetic/reduce.cpp (native int8..int64
oracle per block type, a == q*b + r for 128- to 1000-bit integers with one-
and multi-block divisors of both signs, aliasing of the dividend and the
divisor). Against main it traps with SIGFPE at the first multi-block case.

Resolves #1750

BEHAVIOUR-CHANGE: integer<>::reduce() with a divisor wider than one block now returns the correct quotient and remainder (it returned wrong values, or trapped with SIGFPE)

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

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

3 existing lines in 2 files now uncovered.

51345 of 58718 relevant lines covered (87.44%)

9351105.57 hits per line

Coverage Regressions

Lines Coverage ∆ File
2
94.2
0.76% include/sw/universal/number/integer/integer_impl.hpp
1
97.04
-0.06% include/sw/universal/number/cfloat/cfloat_impl.hpp
Jobs
ID Job ID Ran Files Coverage
1 39195828533.1 19 Oct 2026 04:05AM UTC 754
87.44
GitHub Action Run
Source Files on build 39195828533
  • Tree
  • List 754
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #39195828533
  • f3e93a53 on github
  • Prev Build on main (#39192572027)
  • Next Build on main (#39198997099)
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