]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/finite.3
All pages: Remove the 5th argument to .TH
[thirdparty/man-pages.git] / man3 / finite.3
CommitLineData
fea681da
MK
1.\" Copyright 2004 Andries Brouwer <aeb@cwi.nl>.
2.\"
5fbde956 3.\" SPDX-License-Identifier: Linux-man-pages-copyleft
fea681da 4.\"
45186a5d 5.TH FINITE 3 2021-03-22 "Linux man-pages (unreleased)"
fea681da
MK
6.SH NAME
7finite, finitef, finitel, isinf, isinff, isinfl, isnan, isnanf, isnanl \-
c45bd688 8BSD floating-point classification functions
59b669f7
AC
9.SH LIBRARY
10Math library
8fc3b2cf 11.RI ( libm ", " \-lm )
fea681da
MK
12.SH SYNOPSIS
13.nf
fea681da 14.B #include <math.h>
68e4db0a 15.PP
fea681da 16.BI "int finite(double " x );
fea681da 17.BI "int finitef(float " x );
fea681da 18.BI "int finitel(long double " x );
68e4db0a 19.PP
fea681da 20.BI "int isinf(double " x );
fea681da 21.BI "int isinff(float " x );
fea681da 22.BI "int isinfl(long double " x );
68e4db0a 23.PP
fea681da 24.BI "int isnan(double " x );
fea681da 25.BI "int isnanf(float " x );
fea681da
MK
26.BI "int isnanl(long double " x );
27.fi
68e4db0a 28.PP
d39ad78f 29.RS -4
cc4615cc
MK
30Feature Test Macro Requirements for glibc (see
31.BR feature_test_macros (7)):
d39ad78f 32.RE
68e4db0a 33.PP
cc4615cc
MK
34.BR finite (),
35.BR finitef (),
36.BR finitel ():
9d2adbae
MK
37.nf
38 /* Glibc since 2.19: */ _DEFAULT_SOURCE
39 || /* Glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
98c9347c 40.PP
7fde78e6 41.BR isinf ():
5c10d2c5 42 _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE
9d2adbae
MK
43 || /* Glibc since 2.19: */ _DEFAULT_SOURCE
44 || /* Glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
45.fi
98c9347c 46.PP
cc4615cc
MK
47.BR isinff (),
48.BR isinfl ():
9d2adbae
MK
49.nf
50 /* Glibc since 2.19: */ _DEFAULT_SOURCE
51 || /* Glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
52.fi
98c9347c 53.PP
7fde78e6 54.BR isnan ():
9d2adbae
MK
55.nf
56 _XOPEN_SOURCE || _ISOC99_SOURCE
57 || /* Glibc since 2.19: */ _DEFAULT_SOURCE
58 || /* Glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
59.fi
98c9347c 60.PP
cc4615cc
MK
61.BR isnanf (),
62.BR isnanl ():
9d2adbae 63.nf
5c10d2c5 64 _XOPEN_SOURCE >= 600
9d2adbae
MK
65 || /* Glibc since 2.19: */ _DEFAULT_SOURCE
66 || /* Glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
67.fi
fea681da
MK
68.SH DESCRIPTION
69The
5ad225a3
PH
70.BR finite (),
71.BR finitef (),
72and
73.BR finitel ()
c6fa0841
MK
74functions return a nonzero value if
75.I x
76is neither infinite
fea681da 77nor a "not-a-number" (NaN) value, and 0 otherwise.
847e0d88 78.PP
fea681da 79The
5ad225a3
PH
80.BR isnan (),
81.BR isnanf (),
82and
83.BR isnanl ()
c6fa0841
MK
84functions return a nonzero value if
85.I x
86is a NaN value,
fea681da 87and 0 otherwise.
847e0d88 88.PP
fea681da 89The
5ad225a3
PH
90.BR isinf (),
91.BR isinff (),
92and
93.BR isinfl ()
c6fa0841
MK
94functions return 1 if
95.I x
96is positive infinity, \-1 if
97.I x
6457ee5a 98is negative infinity, and 0 otherwise.
77aa3ddc 99.SH ATTRIBUTES
a3a57673
MK
100For an explanation of the terms used in this section, see
101.BR attributes (7).
c466875e
MK
102.ad l
103.nh
a3a57673
MK
104.TS
105allbox;
c466875e 106lbx lb lb
a3a57673
MK
107l l l.
108Interface Attribute Value
109T{
77aa3ddc
PH
110.BR finite (),
111.BR finitef (),
112.BR finitel (),
113.BR isinf (),
114.BR isinff (),
115.BR isinfl (),
116.BR isnan (),
117.BR isnanf (),
77aa3ddc 118.BR isnanl ()
a3a57673
MK
119T} Thread safety MT-Safe
120.TE
c466875e
MK
121.hy
122.ad
123.sp 1
19c98696 124.SH NOTES
c13182ef
MK
125Note that these functions are obsolete.
126C99 defines macros
b4e00e78 127.BR isfinite (),
efca8360
MK
128.BR isinf (),
129and
130.BR isnan ()
131(for all types) replacing them.
132Further note that the C99
133.BR isinf ()
134has weaker guarantees on the return value.
fea681da
MK
135See
136.BR fpclassify (3).
137.\"
138.\" finite* not on HP-UX; they exist on Tru64.
889829be
MK
139.\" .SH HISTORY
140.\" The
141.\" .BR finite ()
142.\" function occurs in 4.3BSD.
b14d4aa5 143.\" see IEEE.3 in the 4.3BSD manual
47297adb 144.SH SEE ALSO
cc4615cc 145.BR fpclassify (3)