Skip to content

Conversation

@rfourquet
Copy link
Member

The way we were counting the number of bits was assigning a negative number to 0, which could lead to a negative total number of bits. Better to just exit early in this case.
Also, the estimate was slightly off because we were counting the number of leading zeros in the least significant limb, instead of the most significant.

@rfourquet rfourquet force-pushed the rf/fix-prod-bigint branch 2 times, most recently from a8911ff to 53bef9a Compare September 7, 2022 11:06
@KristofferC KristofferC added the backport 1.8 Change should be backported to release-1.8 label Sep 7, 2022
@rfourquet rfourquet added bugfix This change fixes an existing bug bignums BigInt and BigFloat labels Sep 7, 2022
The way we were counting the number of bits was assigning a negative number
to `0`, which could lead to a negative total number of bits. Better to just
exit early in this case.
Also, the estimate was slightly off because we were counting the number of leading
zeros in the least significant limb, instead of the most significant.
@JeffBezanson JeffBezanson merged commit f7b4ebe into master Sep 7, 2022
@JeffBezanson JeffBezanson deleted the rf/fix-prod-bigint branch September 7, 2022 21:24
KristofferC pushed a commit that referenced this pull request Sep 16, 2022
The way we were counting the number of bits was assigning a negative number
to `0`, which could lead to a negative total number of bits. Better to just
exit early in this case.
Also, the estimate was slightly off because we were counting the number of leading
zeros in the least significant limb, instead of the most significant.

(cherry picked from commit f7b4ebe)
@KristofferC KristofferC mentioned this pull request Sep 16, 2022
28 tasks
@KristofferC KristofferC removed the backport 1.8 Change should be backported to release-1.8 label Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bignums BigInt and BigFloat bugfix This change fixes an existing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants