2 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
4 .\" SPDX-License-Identifier: GPL-1.0-or-later
6 .\" Based on glibc infopages
10 .TH nan 3 (date) "Linux man-pages (unreleased)"
12 nan, nanf, nanl \- return 'Not a Number'
15 .RI ( libm ", " \-lm )
20 .BI "double nan(const char *" tagp );
21 .BI "float nanf(const char *" tagp );
22 .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 For an explanation of the terms used in this section, see
76 Interface Attribute Value
83 T} Thread safety MT-Safe locale
88 See also IEC 559 and the appendix with
89 recommended functions in IEEE 754/IEEE 854.