]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/nan.3
Wrap long lines; start sentences on new lines
[thirdparty/man-pages.git] / man3 / nan.3
1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2 .\" Distributed under GPL
3 .\" Based on glibc infopages
4 .\"
5 .\" Corrections by aeb
6 .TH NAN 3 2002-08-10 "GNU" "libc math functions"
7 .SH NAME
8 nan, nanf, nanl \- return 'Not a Number'
9 .SH SYNOPSIS
10 .B #include <math.h>
11 .sp
12 .BI "double nan(const char *" tagp );
13 .br
14 .BI "float nanf(const char *" tagp );
15 .br
16 .BI "long double nanl(const char *" tagp );
17 .sp
18 Compile with \-std=c99; link with \-lm.
19 .SH DESCRIPTION
20 These functions return a representation (determined by
21 .IR tagp )
22 of a quiet NaN.
23 If the implementation does not support
24 quiet NaNs, these functions return zero.
25 .LP
26 The call
27 .I nan("char-sequence")
28 is equivalent to
29 .I strtod ("NAN(char-sequence)",NULL)
30 and similarly calls to
31 .BR nanf ()
32 and
33 .BR nanl ()
34 are equivalent to analogous calls to
35 .BR strtof ()
36 and
37 .BR strtold ().
38 .PP
39 The argument
40 .I tagp
41 is used in an unspecified manner.
42 On IEEE 754 systems, there are many representations of NaN, and
43 .I tagp
44 selects one.
45 On other systems it may do nothing.
46 .SH "CONFORMING TO"
47 C99.
48 See also IEC 559 and the appendix with
49 recommended functions in IEEE 754/IEEE 854.
50 .SH "SEE ALSO"
51 .BR isnan (3),
52 .BR strtod (3)