]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/finite.3
encrypt.3: srcfix: rewrap source lines
[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 2017-09-15 "" "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 .PP
33 .BI "int finite(double " x );
34 .BI "int finitef(float " x );
35 .BI "int finitel(long double " x );
36 .PP
37 .BI "int isinf(double " x );
38 .BI "int isinff(float " x );
39 .BI "int isinfl(long double " x );
40 .PP
41 .BI "int isnan(double " x );
42 .BI "int isnanf(float " x );
43 .BI "int isnanl(long double " x );
44 .fi
45 .PP
46 .in -4n
47 Feature Test Macro Requirements for glibc (see
48 .BR feature_test_macros (7)):
49 .in
50 .PP
51 .ad l
52 .BR finite (),
53 .BR finitef (),
54 .BR finitel ():
55 .RS 4
56 /* Glibc since 2.19: */ _DEFAULT_SOURCE
57 || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
58 .RE
59 .BR isinf ():
60 .RS 4
61 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE
62 || /* Glibc since 2.19: */ _DEFAULT_SOURCE
63 || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
64 .RE
65 .br
66 .BR isinff (),
67 .BR isinfl ():
68 .RS 4
69 /* Glibc since 2.19: */ _DEFAULT_SOURCE
70 || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
71 .RE
72 .BR isnan ():
73 .RS 4
74 _XOPEN_SOURCE || _ISOC99_SOURCE
75 || /* Glibc since 2.19: */ _DEFAULT_SOURCE
76 || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
77 .RE
78 .BR isnanf (),
79 .BR isnanl ():
80 .RS 4
81 _XOPEN_SOURCE\ >=\ 600
82 || /* Glibc since 2.19: */ _DEFAULT_SOURCE
83 || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
84 .RE
85 .ad b
86 .SH DESCRIPTION
87 The
88 .BR finite (),
89 .BR finitef (),
90 and
91 .BR finitel ()
92 functions return a nonzero value if
93 .I x
94 is neither infinite
95 nor a "not-a-number" (NaN) value, and 0 otherwise.
96 .PP
97 The
98 .BR isnan (),
99 .BR isnanf (),
100 and
101 .BR isnanl ()
102 functions return a nonzero value if
103 .I x
104 is a NaN value,
105 and 0 otherwise.
106 .PP
107 The
108 .BR isinf (),
109 .BR isinff (),
110 and
111 .BR isinfl ()
112 functions return 1 if
113 .I x
114 is positive infinity, \-1 if
115 .I x
116 is negative infinity, and 0 otherwise.
117 .SH ATTRIBUTES
118 For an explanation of the terms used in this section, see
119 .BR attributes (7).
120 .TS
121 allbox;
122 lbw31 lb lb
123 l l l.
124 Interface Attribute Value
125 T{
126 .BR finite (),
127 .BR finitef (),
128 .BR finitel (),
129 .br
130 .BR isinf (),
131 .BR isinff (),
132 .BR isinfl (),
133 .br
134 .BR isnan (),
135 .BR isnanf (),
136 .BR isnanl ()
137 T} Thread safety MT-Safe
138 .TE
139 .SH NOTES
140 Note that these functions are obsolete.
141 C99 defines macros
142 .BR isfinite (),
143 .BR isinf (),
144 and
145 .BR isnan ()
146 (for all types) replacing them.
147 Further note that the C99
148 .BR isinf ()
149 has weaker guarantees on the return value.
150 See
151 .BR fpclassify (3).
152 .\"
153 .\" finite* not on HP-UX; they exist on Tru64.
154 .\" .SH HISTORY
155 .\" The
156 .\" .BR finite ()
157 .\" function occurs in 4.3BSD.
158 .\" see IEEE.3 in the 4.3BSD manual
159 .SH SEE ALSO
160 .BR fpclassify (3)