-
-
Notifications
You must be signed in to change notification settings - Fork 706
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 16264(+11599) - BigInt multiplication crashes on 64-bit #5715
Conversation
|
Thanks for your pull request, @yosupo06! We are looking forward to reviewing it, and you should be hearing from a maintainer soon. Some tips to help speed things up:
Bear in mind that large or tricky changes may require multiple rounds of review and revision. Please see CONTRIBUTING.md for more information. Bugzilla references
|
|
Thanks for your fix and thorough testing. |
| mulKaratsuba(result[0 .. half + y.length], y, x[0 .. half], scratchbuff); | ||
| partial[] = result[half .. half + y.length]; | ||
| mulKaratsuba(result[half .. $], y, x[half .. $], scratchbuff); | ||
| addAssignSimple(result[half .. half + y.length], partial); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks structurally very similar to the variant below, any chance this could be integrated there?
| paddingY = true; | ||
| assert(chunksize + extra + chunksize *(numchunks-1) == x.length ); | ||
| bool isExtraSmall = extra * extra * 2 < y.length * y.length; | ||
| if (numchunks == 1 && isExtraSmall) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a comment what this condition means?
|
thx |
|
This pull request introduced a regression: |
https://gist.github.com/yosupo06/03bc48477049c8ac094a242bee511d0d#file-a-d : Stress test code