]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/nan.3
dlopen.3: Note that symbol use might keep a dlclose'd object in memory
[thirdparty/man-pages.git] / man3 / nan.3
1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2 .\"
3 .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
4 .\" Distributed under GPL
5 .\" %%%LICENSE_END
6 .\"
7 .\" Based on glibc infopages
8 .\"
9 .\" Corrections by aeb
10 .\"
11 .TH NAN 3 2016-03-15 "GNU" "Linux Programmer's Manual"
12 .SH NAME
13 nan, nanf, nanl \- return 'Not a Number'
14 .SH SYNOPSIS
15 .B #include <math.h>
16 .PP
17 .BI "double nan(const char *" tagp );
18 .br
19 .BI "float nanf(const char *" tagp );
20 .br
21 .BI "long double nanl(const char *" tagp );
22 .PP
23 Link with \fI\-lm\fP.
24 .PP
25 .in -4n
26 Feature Test Macro Requirements for glibc (see
27 .BR feature_test_macros (7)):
28 .in
29 .PP
30 .ad l
31 .BR nan (),
32 .BR nanf (),
33 .BR nanl ():
34 .RS 4
35 _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
36 .RE
37 .ad
38 .SH DESCRIPTION
39 These functions return a representation (determined by
40 .IR tagp )
41 of a quiet NaN.
42 If the implementation does not support
43 quiet NaNs, these functions return zero.
44 .PP
45 The call
46 .I nan("char-sequence")
47 is equivalent to:
48 .PP
49 .in +4n
50 .EX
51 strtod("NAN(char-sequence)", NULL);
52 .EE
53 .in
54 .PP
55 Similarly, calls to
56 .BR nanf ()
57 and
58 .BR nanl ()
59 are equivalent to analogous calls to
60 .BR strtof (3)
61 and
62 .BR strtold (3).
63 .PP
64 The argument
65 .I tagp
66 is used in an unspecified manner.
67 On IEEE 754 systems, there are many representations of NaN, and
68 .I tagp
69 selects one.
70 On other systems it may do nothing.
71 .SH VERSIONS
72 These functions first appeared in glibc in version 2.1.
73 .SH ATTRIBUTES
74 For an explanation of the terms used in this section, see
75 .BR attributes (7).
76 .TS
77 allbox;
78 lbw21 lb lb
79 l l l.
80 Interface Attribute Value
81 T{
82 .BR nan (),
83 .BR nanf (),
84 .BR nanl ()
85 T} Thread safety MT-Safe locale
86 .TE
87 .SH CONFORMING TO
88 C99, POSIX.1-2001, POSIX.1-2008.
89 See also IEC 559 and the appendix with
90 recommended functions in IEEE 754/IEEE 854.
91 .SH SEE ALSO
92 .BR isnan (3),
93 .BR strtod (3),
94 .BR math_error (7)