Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix issue #46665, prod(::Array{BigInt}) #46667

Merged
merged 1 commit into from
Sep 7, 2022
Merged

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