1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
3 .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
4 .\" Distributed under GPL
7 .\" Based on glibc infopages
11 .TH NAN 3 2021-03-22 "GNU" "Linux Programmer's Manual"
13 nan, nanf, nanl \- return 'Not a Number'
18 .BI "double nan(const char *" tagp );
19 .BI "float nanf(const char *" tagp );
20 .BI "long double nanl(const char *" tagp );
26 Feature Test Macro Requirements for glibc (see
27 .BR feature_test_macros (7)):
34 _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
37 These functions return a representation (determined by
40 If the implementation does not support
41 quiet NaNs, these functions return zero.
44 .I nan("char\-sequence")
49 strtod("NAN(char\-sequence)", NULL);
57 are equivalent to analogous calls to
64 is used in an unspecified manner.
65 On IEEE 754 systems, there are many representations of NaN, and
68 On other systems it may do nothing.
70 These functions first appeared in glibc in version 2.1.
72 For an explanation of the terms used in this section, see
80 Interface Attribute Value
85 T} Thread safety MT-Safe locale
91 C99, POSIX.1-2001, POSIX.1-2008.
92 See also IEC 559 and the appendix with
93 recommended functions in IEEE 754/IEEE 854.