-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
prod(::Vector{BigInt})
broken on 1.8 and master
#46665
Labels
Comments
KristofferC
added
regression
Regression in behavior compared to a previous version
bignums
BigInt and BigFloat
labels
Sep 7, 2022
rfourquet
added a commit
that referenced
this issue
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.
rfourquet
added a commit
that referenced
this issue
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.
Thanks for the report, there were indeed two bugs there; |
rfourquet
added a commit
that referenced
this issue
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.
rfourquet
added a commit
that referenced
this issue
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
pushed a commit
that referenced
this issue
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.
Fixed in #46667, thanks @rfourquet. (Not sure why github did not automatically close the issue.) |
KristofferC
pushed a commit
that referenced
this issue
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)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
It would be great if the following could be fixed for 1.8 (it is working fine on <= 1.7).
The line
julia/base/gmp.jl
Line 672 in 83658d2
looks wrong, in particular the
unsafe_load(x.d)
.CC: @rfourquet
The text was updated successfully, but these errors were encountered: