Re: Checking for NaN
Posted: August 28th, 2020, 7:30 pm
Again, thanks for taking a look and helping me correct it, sorry I get a little dense sometimes.
Doing 0/0 should work.albinopapa wrote: ↑August 28th, 2020, 7:00 pmAside from std::nan() and the std::numeric_limits functions, how would you even getting a nan as a result? I tried dividing by 0.0 and end up getting inf.
Code: Select all
double zero = 0.0f;
x.f = zero / zero;