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

moonbitlang / core / 6080
91%

Build:
DEFAULT BRANCH: main
Ran 15 Aug 2026 06:59AM UTC
Jobs 1
Files 437
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

15 Aug 2026 06:57AM UTC coverage: 90.669% (+0.003%) from 90.666%
6080

push

github

bobzhang
fix(bigint): correct to_uint/to_uint64 truncation of large negatives

The non-js to_uint/to_uint64 (and hence to_int/to_int64) computed the
truncation of a negative value by adding one modulus and reading
magnitude limbs. That is wrong whenever the sum is still negative,
i.e. whenever |x| > 2^32 (resp. 2^64) — already -(2^32 + 1) was
mishandled: (-(1N << 32) - 1N).to_uint() returned 1 instead of
4294967295, and (-(1N << 33) - 5N).to_uint() returned 5 instead of
4294967291; only exact modulus multiples and scattered coincidental
residues came out right. js was already correct via BigInt.asUintN and
is unchanged.

Truncation to 2^k is a ring homomorphism, so for a negative value it is
the wrapping negation of the magnitude's low bits; compute it that way.

Fixes #4050

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

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

16003 of 17650 relevant lines covered (90.67%)

150803.29 hits per line

Jobs
ID Job ID Ran Files Coverage
1 6080.1 15 Aug 2026 06:59AM UTC 438
90.68
GitHub Action Run
Source Files on build 6080
  • Tree
  • List 437
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • cc44306d on github
  • Prev Build on main (#6078)
  • Next Build on main (#6082)
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