Standards / Extensions | C or C++ | Dependencies |
---|---|---|
XPG4 |
both | z/OS® V1R8 |
#define _XOPEN_SOURCE
#include <math.h>
int isnan(double x);
#define __STDC_WANT_DEC_FP__
#include <math.h>
int isnan(real-floating x); /* C only */
int isnan(decimal-floating x); /* C only */
bool isnan(real-floating x); /* C++ only */
bool isnan(decimal-floating x); /* C++ only */
#define _TR1_C99
#include <math.h>
bool isnan(double x); /* C++ only */
The isnan() function tests whether x is NaN (not a number).
For IEEE Decimal Floating Point numbers and Binary Floating Point numbers, a non-zero value is returned if x is a NAN. The C++ function template returns true if x is a NAN.
Special behavior in Hex
The isnan() macro returns zero. The C++ function template returns false.