]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/finite.3
fanotify_init.2, fanotify.7: Document FAN_REPORT_TID
[thirdparty/man-pages.git] / man3 / finite.3
CommitLineData
fea681da
MK
1.\" Copyright 2004 Andries Brouwer <aeb@cwi.nl>.
2.\"
93015253 3.\" %%%LICENSE_START(VERBATIM)
fea681da
MK
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.
c13182ef 12.\"
fea681da
MK
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.
c13182ef 20.\"
fea681da
MK
21.\" Formatted or processed versions of this manual, if unaccompanied by
22.\" the source, must acknowledge the copyright and authors of this work.
4b72fb64 23.\" %%%LICENSE_END
fea681da 24.\"
4b8c67d9 25.TH FINITE 3 2017-09-15 "" "Linux Programmer's Manual"
fea681da
MK
26.SH NAME
27finite, finitef, finitel, isinf, isinff, isinfl, isnan, isnanf, isnanl \-
c45bd688 28BSD floating-point classification functions
fea681da
MK
29.SH SYNOPSIS
30.nf
fea681da 31.B #include <math.h>
68e4db0a 32.PP
fea681da 33.BI "int finite(double " x );
fea681da 34.BI "int finitef(float " x );
fea681da 35.BI "int finitel(long double " x );
68e4db0a 36.PP
fea681da 37.BI "int isinf(double " x );
fea681da 38.BI "int isinff(float " x );
fea681da 39.BI "int isinfl(long double " x );
68e4db0a 40.PP
fea681da 41.BI "int isnan(double " x );
fea681da 42.BI "int isnanf(float " x );
fea681da
MK
43.BI "int isnanl(long double " x );
44.fi
68e4db0a 45.PP
cc4615cc
MK
46.in -4n
47Feature Test Macro Requirements for glibc (see
48.BR feature_test_macros (7)):
49.in
68e4db0a 50.PP
cc4615cc
MK
51.ad l
52.BR finite (),
53.BR finitef (),
54.BR finitel ():
63349ee5 55.RS 4
d59161f9
MK
56/* Glibc since 2.19: */ _DEFAULT_SOURCE
57 || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
63349ee5 58.RE
7fde78e6 59.BR isinf ():
63349ee5 60.RS 4
d59161f9
MK
61_XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE
62 || /* Glibc since 2.19: */ _DEFAULT_SOURCE
63 || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
63349ee5 64.RE
7fde78e6 65.br
cc4615cc
MK
66.BR isinff (),
67.BR isinfl ():
63349ee5 68.RS 4
d59161f9
MK
69/* Glibc since 2.19: */ _DEFAULT_SOURCE
70 || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
63349ee5 71.RE
7fde78e6 72.BR isnan ():
63349ee5 73.RS 4
d59161f9
MK
74_XOPEN_SOURCE || _ISOC99_SOURCE
75 || /* Glibc since 2.19: */ _DEFAULT_SOURCE
76 || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
63349ee5 77.RE
cc4615cc
MK
78.BR isnanf (),
79.BR isnanl ():
63349ee5 80.RS 4
d59161f9
MK
81_XOPEN_SOURCE\ >=\ 600
82 || /* Glibc since 2.19: */ _DEFAULT_SOURCE
83 || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
63349ee5 84.RE
cc4615cc 85.ad b
fea681da
MK
86.SH DESCRIPTION
87The
5ad225a3
PH
88.BR finite (),
89.BR finitef (),
90and
91.BR finitel ()
c6fa0841
MK
92functions return a nonzero value if
93.I x
94is neither infinite
fea681da 95nor a "not-a-number" (NaN) value, and 0 otherwise.
847e0d88 96.PP
fea681da 97The
5ad225a3
PH
98.BR isnan (),
99.BR isnanf (),
100and
101.BR isnanl ()
c6fa0841
MK
102functions return a nonzero value if
103.I x
104is a NaN value,
fea681da 105and 0 otherwise.
847e0d88 106.PP
fea681da 107The
5ad225a3
PH
108.BR isinf (),
109.BR isinff (),
110and
111.BR isinfl ()
c6fa0841
MK
112functions return 1 if
113.I x
114is positive infinity, \-1 if
115.I x
6457ee5a 116is negative infinity, and 0 otherwise.
77aa3ddc 117.SH ATTRIBUTES
a3a57673
MK
118For an explanation of the terms used in this section, see
119.BR attributes (7).
120.TS
121allbox;
122lbw31 lb lb
123l l l.
124Interface Attribute Value
125T{
77aa3ddc
PH
126.BR finite (),
127.BR finitef (),
128.BR finitel (),
a3a57673 129.br
77aa3ddc
PH
130.BR isinf (),
131.BR isinff (),
132.BR isinfl (),
a3a57673 133.br
77aa3ddc
PH
134.BR isnan (),
135.BR isnanf (),
77aa3ddc 136.BR isnanl ()
a3a57673
MK
137T} Thread safety MT-Safe
138.TE
19c98696 139.SH NOTES
c13182ef
MK
140Note that these functions are obsolete.
141C99 defines macros
b4e00e78 142.BR isfinite (),
efca8360
MK
143.BR isinf (),
144and
145.BR isnan ()
146(for all types) replacing them.
147Further note that the C99
148.BR isinf ()
149has weaker guarantees on the return value.
fea681da
MK
150See
151.BR fpclassify (3).
152.\"
153.\" finite* not on HP-UX; they exist on Tru64.
889829be
MK
154.\" .SH HISTORY
155.\" The
156.\" .BR finite ()
157.\" function occurs in 4.3BSD.
b14d4aa5 158.\" see IEEE.3 in the 4.3BSD manual
47297adb 159.SH SEE ALSO
cc4615cc 160.BR fpclassify (3)