isnan, _isnan, _isnanf
Tests if a floating-point value is not a number (NAN).
The floating-point value to test.
In C, the isnan macro and the _isnan and _isnanf functions return a nonzero value if the argument x is a NAN; otherwise they return 0.
In C++, the isnan template functions return true if the argument x is a NAN; otherwise they return false.
The C isnan macro and the _isnan and _isnanf functions test floating-point value x, returning a nonzero value if x is a Not a Number (NAN) value. A NAN is generated when the result of a floating-point operation can't be represented in IEEE-754 floating-point format for the specified type. For information about how a NAN is represented for output, see printf.
When compiled as C++, the isnan macro is not defined, and an isnan template function is defined instead. It returns a value of type bool instead of an integer.
The _isnan and _isnanf functions are Microsoft specific. The _isnanf function is only available when compiled for x64.
Required header (C)
Required header (C++)
<math.h> or <cmath>
<float.h> or <cfloat>
For more compatibility information, see Compatibility.