Is there an isnan() function?
PS.: I\'m in MinGW (if that makes a difference).
I had this solved by using isnan() from
, which doe
There is also a header-only library present in Boost that have neat tools to deal with floating point datatypes
#include
You get the following functions:
template bool isfinite(T z);
template bool isinf(T t);
template bool isnan(T t);
template bool isnormal(T t);
If you have time then have a look at whole Math toolkit from Boost, it has many useful tools and is growing quickly.
Also when dealing with floating and non-floating points it might be a good idea to look at the Numeric Conversions.