mirror of
https://github.com/apple/swift-numerics
synced 2026-11-27 05:04:26 +00:00
Another case where we'd get wrong negatives possibly
This commit is contained in:
1 parent
87900161d6
commit
19951768df
1 file changed
+4
@@ -644,6 +644,10 @@ extension BigInt {
|
||||
(quot[j], r) = v.dividingFullWidth((r, uj))
|
||||
}
|
||||
|
||||
if quot[1] > UInt(Int.max) {
|
||||
quot.append(0)
|
||||
}
|
||||
|
||||
BigInt._dropExcessWords(words: ")
|
||||
return (quotient: BigInt(_uncheckedWords: quot), remainder: BigInt(r))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user