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

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

Build:
Build:
LAST BUILD BRANCH: fix/issue-1002-ereal-highprec-constants
DEFAULT BRANCH: master
Ran 17 May 2026 09:52PM UTC
Jobs 1
Files 652
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

17 May 2026 09:22PM UTC coverage: 84.081% (-0.01%) from 84.094%
26003086638

push

github

web-flow
fix(einteger): correct borrow propagation in Knuth Algorithm D step D4 (#861)

The multi-limb long-division in einteger::operator/= used an unsigned
diff/borrow pair in Knuth's step D4. The idiomatic underflow indicator
`diff >> bitsInBlock` only yields -1/0 with arithmetic right shift on
a signed type; with uint64 it returns 0x...FFFFFFFF on underflow and
`p_hi - 0xFFFFFFFF` wraps to a huge unsigned value that corrupts the
next iteration's borrow_in, producing a quotient too large by exactly
one limb for some inputs. Switch diff/borrow to int64 so the shift
acts as a proper sign extension.

In the same step also fix two hardcoded 32-bit shifts that prevented
the multi-limb division and remainder-denormalization paths from
working with uint8_t and uint16_t blocks: the carry shift in the
"subtracted too much, add back" branch and the remainder normalization
loop now use `bitsInBlock` instead of a literal 32. The low-bits mask
in D4 is derived from BASE-1 so it tracks the block width.

Add a regression test (RegressionIssue842) that computes
(3141592653589793 << 100) / 5^15 with einteger<uint8_t/16_t/32_t> and
compares against an independent integer<2048> reference via decimal
string. Pre-fix the uint32_t case (the default einteger<> the bug was
originally reported against) computed an off-by-2^64 quotient.

Resolves #842

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

11 of 12 new or added lines in 1 file covered. (91.67%)

12 existing lines in 2 files now uncovered.

46685 of 55524 relevant lines covered (84.08%)

6352977.91 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
85.1
0.24% include/sw/universal/number/einteger/einteger_impl.hpp

Coverage Regressions

Lines Coverage ∆ File
10
31.43
-3.57% include/sw/universal/verification/test_suite_randoms.hpp
2
89.78
-0.55% include/sw/universal/number/posito/posito_impl.hpp
Jobs
ID Job ID Ran Files Coverage
1 26003086638.1 17 May 2026 09:52PM UTC 652
84.08
GitHub Action Run
Source Files on build 26003086638
  • Tree
  • List 652
  • Changed 4
  • Source Changed 1
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26003086638
  • 95d31a33 on github
  • Prev Build on main (#26002163594)
  • Next Build on main (#26004245518)
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