]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/finite.3
Wrapped long lines, wrapped at sentence boundaries; stripped trailing
[thirdparty/man-pages.git] / man3 / finite.3
CommitLineData
fea681da
MK
1.\" Copyright 2004 Andries Brouwer <aeb@cwi.nl>.
2.\"
3.\" Permission is granted to make and distribute verbatim copies of this
4.\" manual provided the copyright notice and this permission notice are
5.\" preserved on all copies.
6.\"
7.\" Permission is granted to copy and distribute modified versions of this
8.\" manual under the conditions for verbatim copying, provided that the
9.\" entire resulting derived work is distributed under the terms of a
10.\" permission notice identical to this one.
c13182ef 11.\"
fea681da
MK
12.\" Since the Linux kernel and libraries are constantly changing, this
13.\" manual page may be incorrect or out-of-date. The author(s) assume no
14.\" responsibility for errors or omissions, or for damages resulting from
15.\" the use of the information contained herein. The author(s) may not
16.\" have taken the same level of care in the production of this manual,
17.\" which is licensed free of charge, as they might when working
18.\" professionally.
c13182ef 19.\"
fea681da
MK
20.\" Formatted or processed versions of this manual, if unaccompanied by
21.\" the source, must acknowledge the copyright and authors of this work.
22.\"
23.TH FINITE 3 2004-10-31 "" "Linux Programmer's Manual"
24.SH NAME
25finite, finitef, finitel, isinf, isinff, isinfl, isnan, isnanf, isnanl \-
26BSD floating point classification functions
27.SH SYNOPSIS
28.nf
29#define _BSD_SOURCE
30.br
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.SH DESCRIPTION
52The
e511ffb6 53.BR finite ()
fea681da
MK
54functions return a non-zero value if \fIx\fP is neither infinite
55nor a "not-a-number" (NaN) value, and 0 otherwise.
56
57The
e511ffb6 58.BR isnan ()
fea681da
MK
59functions return a non-zero value if \fIx\fP is a NaN value,
60and 0 otherwise.
61
62The
e511ffb6 63.BR isinf ()
fea681da
MK
64functions return 1 if \fIx\fP is plus infinity, \-1 is \fIx\fP
65is minus infinity, and 0 otherwise.
fea681da 66.SH NOTE
c13182ef
MK
67Note that these functions are obsolete.
68C99 defines macros
fea681da
MK
69isfinite(), isinf() and isnan() (for all types) replacing them.
70Further note that the C99 isinf() has weaker guarantees on the return value.
71See
72.BR fpclassify (3).
73.\"
74.\" finite* not on HP-UX; they exist on Tru64.
75.SH AVAILABILITY
76On a glibc system, these functions are declared by
77.I <math.h>
78when _BSD_SOURCE or _SVID_SOURCE or _GNU_SOURCE is defined.
79The isnan() functions will also be declared when _XOPEN_SOURCE
80is defined.
81.SH HISTORY
82The
e511ffb6 83.BR finite ()
b14d4aa5
MK
84function occurs in 4.3BSD.
85.\" see IEEE.3 in the 4.3BSD manual
fea681da 86.SH "SEE ALSO"
50e5322c 87.BR fpclassify (3),
a8e7c990 88.BR feature_test_macros (7)