Why do you return x-x for inf or nan? I can't test now, but I imagine they both return nan?
I run a high performance math library in C#, and I'm always looking to improve.
I run a high performance math library in C#, and I'm always looking to improve.
https://en.cppreference.com/w/cpp/numeric/fenv/FE_exceptions