Return a quiet NaN.
#include <math.h>
double nan (tagp)
const char *tagp;
float nanf (tagp)
const char *tagp;
long double nanl (tagp)
const char *tagp;
_Decimal32 nand32(tagp)
const char *tagp;
_Decimal64 nand64(tagp)
const char *tagp;
_Decimal128 nand128(tagp)const char *tagp;
The function call nan("n-char-sequence") is equivalent to:
strtod("NAN(n-char-sequence)", (char **) NULL);
The function call nan(" ") is equivalent to:
strtod("NAN()", (char **) NULL)
If tagp does not point to an n-char sequence or an empty string, the function call is equivalent to:
strtod("NAN", (char **) NULL)
Function calls to the nanf, nanl, nand32, nand64, and nand128 subroutines are equivalent to the corresponding function calls to the strtof, strtold, strtod32, strtod64, and strtod128 subroutines.
Item | Description |
---|---|
tagp | Indicates the content of the quiet NaN. |
The nan, nanf, nanl, nand32, nand64, and nand128 subroutines return a quiet NaN with content indicated through tagp.