]>
Commit | Line | Data |
---|---|---|
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 | .\" | |
cc4615cc | 23 | .TH FINITE 3 2007-07-26 "" "Linux Programmer's Manual" |
fea681da MK |
24 | .SH NAME |
25 | finite, finitef, finitel, isinf, isinff, isinfl, isnan, isnanf, isnanl \- | |
c45bd688 | 26 | BSD floating-point classification functions |
fea681da MK |
27 | .SH SYNOPSIS |
28 | .nf | |
fea681da MK |
29 | .B #include <math.h> |
30 | .sp | |
31 | .BI "int finite(double " x ); | |
32 | .br | |
33 | .BI "int finitef(float " x ); | |
34 | .br | |
35 | .BI "int finitel(long double " x ); | |
36 | .sp | |
37 | .BI "int isinf(double " x ); | |
38 | .br | |
39 | .BI "int isinff(float " x ); | |
40 | .br | |
41 | .BI "int isinfl(long double " x ); | |
42 | .sp | |
43 | .BI "int isnan(double " x ); | |
44 | .br | |
45 | .BI "int isnanf(float " x ); | |
46 | .br | |
47 | .BI "int isnanl(long double " x ); | |
48 | .fi | |
cc4615cc MK |
49 | .sp |
50 | .in -4n | |
51 | Feature Test Macro Requirements for glibc (see | |
52 | .BR feature_test_macros (7)): | |
53 | .in | |
54 | .sp | |
55 | .ad l | |
56 | .BR finite (), | |
57 | .BR finitef (), | |
58 | .BR finitel (): | |
59 | _BSD_SOURCE || _SVID_SOURCE | |
60 | .br | |
61 | .BR isinf (), | |
62 | .BR isinff (), | |
63 | .BR isinfl (): | |
64 | _BSD_SOURCE || _SVID_SOURCE | |
65 | .br | |
66 | .BR isnan (), | |
67 | .BR isnanf (), | |
68 | .BR isnanl (): | |
69 | _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE | |
70 | .ad b | |
fea681da MK |
71 | .SH DESCRIPTION |
72 | The | |
e511ffb6 | 73 | .BR finite () |
eba72288 | 74 | functions return a non-zero value if \fIx\fP is neither infinite |
fea681da MK |
75 | nor a "not-a-number" (NaN) value, and 0 otherwise. |
76 | ||
77 | The | |
e511ffb6 | 78 | .BR isnan () |
eba72288 | 79 | functions return a non-zero value if \fIx\fP is a NaN value, |
fea681da MK |
80 | and 0 otherwise. |
81 | ||
82 | The | |
e511ffb6 | 83 | .BR isinf () |
6457ee5a MK |
84 | functions return 1 if \fIx\fP is positive infinity, \-1 is \fIx\fP |
85 | is negative infinity, and 0 otherwise. | |
19c98696 | 86 | .SH NOTES |
c13182ef MK |
87 | Note that these functions are obsolete. |
88 | C99 defines macros | |
b4e00e78 | 89 | .BR isfinite (), |
efca8360 MK |
90 | .BR isinf (), |
91 | and | |
92 | .BR isnan () | |
93 | (for all types) replacing them. | |
94 | Further note that the C99 | |
95 | .BR isinf () | |
96 | has weaker guarantees on the return value. | |
fea681da MK |
97 | See |
98 | .BR fpclassify (3). | |
99 | .\" | |
100 | .\" finite* not on HP-UX; they exist on Tru64. | |
889829be MK |
101 | .\" .SH HISTORY |
102 | .\" The | |
103 | .\" .BR finite () | |
104 | .\" function occurs in 4.3BSD. | |
b14d4aa5 | 105 | .\" see IEEE.3 in the 4.3BSD manual |
fea681da | 106 | .SH "SEE ALSO" |
cc4615cc | 107 | .BR fpclassify (3) |