MikeLankamp/fpm

Signed lowest value may cause stack overflow

Opened this issue · 2 comments

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.

Maybe a mere comparison in the method would do?

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