Another case where we'd get wrong negatives possibly

This commit is contained in:
Robert Thompson committed 2020-01-28 17:51:45 -05:00
1 parent 87900161d6
commit 19951768df
1 file changed
+4
+4
View File
@@ -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: &quot)
return (quotient: BigInt(_uncheckedWords: quot), remainder: BigInt(r))
}