1FINITE(3)                  Linux Programmer's Manual                 FINITE(3)
2
3
4

NAME

6       finite,  finitef, finitel, isinf, isinff, isinfl, isnan, isnanf, isnanl
7       - BSD floating point classification functions
8

SYNOPSIS

10       #define _BSD_SOURCE
11       #include <math.h>
12
13       int finite(double x);
14       int finitef(float x);
15       int finitel(long double x);
16
17       int isinf(double x);
18       int isinff(float x);
19       int isinfl(long double x);
20
21       int isnan(double x);
22       int isnanf(float x);
23       int isnanl(long double x);
24

DESCRIPTION

26       The finite() functions return a non-zero value if x is neither infinite
27       nor a "not-a-number" (NaN) value, and 0 otherwise.
28
29       The  isnan() functions return a non-zero value if x is a NaN value, and
30       0 otherwise.
31
32       The isinf() functions return 1 if x is plus infinity, -1 is x is  minus
33       infinity, and 0 otherwise.
34
35

NOTE

37       Note  that these functions are obsolete. C99 defines macros isfinite(),
38       isinf() and isnan() (for all types) replacing them.  Further note  that
39       the C99 isinf() has weaker guarantees on the return value.  See fpclas‐
40       sify(3).
41

AVAILABILITY

43       On a glibc system,  these  functions  are  declared  by  <math.h>  when
44       _BSD_SOURCE  or  _SVID_SOURCE  or  _GNU_SOURCE is defined.  The isnan()
45       functions will also be declared when _XOPEN_SOURCE is defined.
46

HISTORY

48       The finite() function occurs in 4.3BSD.
49

SEE ALSO

51       fpclassify(3), feature_test_macros(7)
52
53
54
55                                  2004-10-31                         FINITE(3)
Impressum