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       #include <math.h>
11
12       int finite(double x);
13       int finitef(float x);
14       int finitel(long double x);
15
16       int isinf(double x);
17       int isinff(float x);
18       int isinfl(long double x);
19
20       int isnan(double x);
21       int isnanf(float x);
22       int isnanl(long double x);
23
24   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
25
26       finite(), finitef(), finitel(): _BSD_SOURCE || _SVID_SOURCE
27       isinf(): _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 600 ||
28       _ISOC99_SOURCE; cc -std=c99
29       isinff(), isinfl(): _BSD_SOURCE || _SVID_SOURCE
30       isnan(): _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE ||
31       _ISOC99_SOURCE; cc -std=c99
32       isnanf(), isnanl(): _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 600
33

DESCRIPTION

35       The finite() functions return a nonzero value if x is neither  infinite
36       nor a "not-a-number" (NaN) value, and 0 otherwise.
37
38       The isnan() functions return a nonzero value if x is a NaN value, and 0
39       otherwise.
40
41       The isinf() functions return 1 if x is positive infinity, -1  if  x  is
42       negative infinity, and 0 otherwise.
43

NOTES

45       Note that these functions are obsolete.  C99 defines macros isfinite(),
46       isinf(), and isnan() (for all types) replacing them.  Further note that
47       the C99 isinf() has weaker guarantees on the return value.  See fpclas‐
48       sify(3).
49

SEE ALSO

51       fpclassify(3)
52

COLOPHON

54       This page is part of release 3.25 of the Linux  man-pages  project.   A
55       description  of  the project, and information about reporting bugs, can
56       be found at http://www.kernel.org/doc/man-pages/.
57
58
59
60                                  2008-08-05                         FINITE(3)
Impressum