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

tanh_sinh quadrature underflows integers #898

Closed
gphlipot13 opened this issue Dec 9, 2022 · 0 comments · Fixed by #901
Closed

tanh_sinh quadrature underflows integers #898

gphlipot13 opened this issue Dec 9, 2022 · 0 comments · Fixed by #901

Comments

@gphlipot13
Copy link

Description

It is possible for some integrals (and some scalar types), the tanh_sinh quadrature method underflows an unsigned integer, resulting in undefined behavior.

Steps to reproduce

See an example where the https://godbolt.org/z/5seaesETo

The integer underflow occurs on this line when max_left_position is 0.

jzmaddock added a commit that referenced this issue Dec 11, 2022
where max_left_index/max_right_index may go to zero if the function being integrated overflows the FP type being used across nearly all of it's range.  Fixes #898
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant