OSDN Git Service

018fb58d9a7b5a5c1b08c5d83e21d2d8a8bb6855
[linuxjm/LDP_man-pages.git] / original / man3 / finite.3
1 .\" Copyright 2004 Andries Brouwer <aeb@cwi.nl>.
2 .\"
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
12 .\"
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein.  The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" %%%LICENSE_END
24 .\"
25 .TH FINITE 3  2013-07-22 "" "Linux Programmer's Manual"
26 .SH NAME
27 finite, finitef, finitel, isinf, isinff, isinfl, isnan, isnanf, isnanl \-
28 BSD floating-point classification functions
29 .SH SYNOPSIS
30 .nf
31 .B #include <math.h>
32 .sp
33 .BI "int finite(double " x );
34 .br
35 .BI "int finitef(float " x );
36 .br
37 .BI "int finitel(long double " x );
38 .sp
39 .BI "int isinf(double " x );
40 .br
41 .BI "int isinff(float " x );
42 .br
43 .BI "int isinfl(long double " x );
44 .sp
45 .BI "int isnan(double " x );
46 .br
47 .BI "int isnanf(float " x );
48 .br
49 .BI "int isnanl(long double " x );
50 .fi
51 .sp
52 .in -4n
53 Feature Test Macro Requirements for glibc (see
54 .BR feature_test_macros (7)):
55 .in
56 .sp
57 .ad l
58 .BR finite (),
59 .BR finitef (),
60 .BR finitel ():
61 .RS 4
62 _BSD_SOURCE || _SVID_SOURCE
63 .RE
64 .BR isinf ():
65 .RS 4
66 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE;
67 .br
68 or
69 .I cc\ -std=c99
70 .RE
71 .br
72 .BR isinff (),
73 .BR isinfl ():
74 .RS 4
75 _BSD_SOURCE || _SVID_SOURCE
76 .RE
77 .BR isnan ():
78 .RS 4
79 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE || _ISOC99_SOURCE;
80 .br
81 or
82 .I cc\ -std=c99
83 .RE
84 .BR isnanf (),
85 .BR isnanl ():
86 .RS 4
87 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600
88 .RE
89 .ad b
90 .SH DESCRIPTION
91 The
92 .BR finite (),
93 .BR finitef (),
94 and
95 .BR finitel ()
96 functions return a nonzero value if
97 .I x
98 is neither infinite
99 nor a "not-a-number" (NaN) value, and 0 otherwise.
100
101 The
102 .BR isnan (),
103 .BR isnanf (),
104 and
105 .BR isnanl ()
106 functions return a nonzero value if
107 .I x
108 is a NaN value,
109 and 0 otherwise.
110
111 The
112 .BR isinf (),
113 .BR isinff (),
114 and
115 .BR isinfl ()
116 functions return 1 if
117 .I x
118 is positive infinity, \-1 if
119 .I x
120 is negative infinity, and 0 otherwise.
121 .SH ATTRIBUTES
122 .SS Multithreading (see pthreads(7))
123 The
124 .BR finite (),
125 .BR finitef (),
126 .BR finitel (),
127 .BR isinf (),
128 .BR isinff (),
129 .BR isinfl (),
130 .BR isnan (),
131 .BR isnanf (),
132 and
133 .BR isnanl ()
134 functions are thread-safe.
135 .SH NOTES
136 Note that these functions are obsolete.
137 C99 defines macros
138 .BR isfinite (),
139 .BR isinf (),
140 and
141 .BR isnan ()
142 (for all types) replacing them.
143 Further note that the C99
144 .BR isinf ()
145 has weaker guarantees on the return value.
146 See
147 .BR fpclassify (3).
148 .\"
149 .\" finite* not on HP-UX; they exist on Tru64.
150 .\" .SH HISTORY
151 .\" The
152 .\" .BR finite ()
153 .\" function occurs in 4.3BSD.
154 .\" see IEEE.3 in the 4.3BSD manual
155 .SH SEE ALSO
156 .BR fpclassify (3)
157 .SH COLOPHON
158 This page is part of release 3.67 of the Linux
159 .I man-pages
160 project.
161 A description of the project,
162 information about reporting bugs,
163 and the latest version of this page,
164 can be found at
165 \%http://www.kernel.org/doc/man\-pages/.