]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/finite.3
dlinfo.3: ATTRIBUTES: Note function that is thread-safe
[thirdparty/man-pages.git] / 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 2015-03-02 "" "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 For an explanation of the terms used in this section, see
123 .BR attributes (7).
124 .TS
125 allbox;
126 lbw31 lb lb
127 l l l.
128 Interface Attribute Value
129 T{
130 .BR finite (),
131 .BR finitef (),
132 .BR finitel (),
133 .br
134 .BR isinf (),
135 .BR isinff (),
136 .BR isinfl (),
137 .br
138 .BR isnan (),
139 .BR isnanf (),
140 .BR isnanl ()
141 T} Thread safety MT-Safe
142 .TE
143 .SH NOTES
144 Note that these functions are obsolete.
145 C99 defines macros
146 .BR isfinite (),
147 .BR isinf (),
148 and
149 .BR isnan ()
150 (for all types) replacing them.
151 Further note that the C99
152 .BR isinf ()
153 has weaker guarantees on the return value.
154 See
155 .BR fpclassify (3).
156 .\"
157 .\" finite* not on HP-UX; they exist on Tru64.
158 .\" .SH HISTORY
159 .\" The
160 .\" .BR finite ()
161 .\" function occurs in 4.3BSD.
162 .\" see IEEE.3 in the 4.3BSD manual
163 .SH SEE ALSO
164 .BR fpclassify (3)