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

Signed lowest value may cause stack overflow #31

Open
UFOylzj opened this issue Feb 10, 2022 · 2 comments
Open

Signed lowest value may cause stack overflow #31

UFOylzj opened this issue Feb 10, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@UFOylzj
Copy link

UFOylzj commented Feb 10, 2022

For example, in the atan function, if x is signed and x is the lowest value, -x will be equal to x. So the function will keep calling itself and cause a stack overflow.

@MikeLankamp MikeLankamp added the bug Something isn't working label Feb 10, 2022
@MikeLankamp MikeLankamp self-assigned this Feb 16, 2022
@vladipus
Copy link

vladipus commented Apr 5, 2023

Maybe a mere comparison in the method would do?

@SirNate0
Copy link

Or possibly swap the function to be implemented for x<=0, as then there would be no attempt to negate that value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants