1NAN(3) libc math functions NAN(3)
2
3
4
6 nan, nanf, nanl - return 'Not a Number'
7
9 #include <math.h>
10
11 double nan(const char *tagp);
12 float nanf(const char *tagp);
13 long double nanl(const char *tagp);
14
15 Compile with -std=c99; link with -lm.
16
18 These functions return a representation (determined by tagp) of a quiet
19 NaN. If the implementation does not support quiet NaNs, these functions
20 return zero.
21
22 The call nan("char-sequence") is equivalent to strtod ("NAN(char-
23 sequence)",NULL) and similarly calls to nanf() and nanl() are equiva‐
24 lent to analogous calls to strtof() and strtold().
25
26 The argument tagp is used in an unspecified manner. On IEEE 754 sys‐
27 tems, there are many representations of NaN, and tagp selects one. On
28 other systems it may do nothing.
29
31 C99. See also IEC 559 and the appendix with recommended functions in
32 IEEE 754/IEEE 854.
33
35 isnan(3), strtod(3)
36
37
38
39GNU 2002-08-10 NAN(3)