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 overflow catch in coeffs function #225

Merged
merged 1 commit into from
Jul 13, 2023

Conversation

alexfreudenberg
Copy link
Contributor

The current implementation doesn't seem to catch integer overflows correctly. Consider the following:

julia> 2^62
4611686018427387904

julia> 2^63
-9223372036854775808

julia> Rational{BigInt}(2^62*2)
-9223372036854775808//1

julia> Rational{BigInt}(2^62)*2
9223372036854775808//1

The current implementation doesn't seem to catch the Integer overflow correctly
@wesselb
Copy link
Member

wesselb commented Jul 13, 2023

Yes, very good catch, @alexfreudenberg!! Thank you. :) I think this can just be merged right away!

@wesselb wesselb merged commit 6deccca into JuliaDiff:main Jul 13, 2023
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants