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():
27           /* Glibc since 2.19: */ _DEFAULT_SOURCE
28               || /* Glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
29
30       isinf():
31           _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE
32               || /* Glibc since 2.19: */ _DEFAULT_SOURCE
33               || /* Glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
34
35       isinff(), isinfl():
36           /* Glibc since 2.19: */ _DEFAULT_SOURCE
37               || /* Glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
38
39       isnan():
40           _XOPEN_SOURCE || _ISOC99_SOURCE
41               || /* Glibc since 2.19: */ _DEFAULT_SOURCE
42               || /* Glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
43
44       isnanf(), isnanl():
45           _XOPEN_SOURCE >= 600
46               || /* Glibc since 2.19: */ _DEFAULT_SOURCE
47               || /* Glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
48

DESCRIPTION

50       The finite(), finitef(), and finitel() functions return a nonzero value
51       if x is neither infinite nor a "not-a-number" (NaN) value, and 0 other‐
52       wise.
53
54       The isnan(), isnanf(), and isnanl() functions return a nonzero value if
55       x is a NaN value, and 0 otherwise.
56
57       The isinf(), isinff(), and isinfl() functions return 1 if x is positive
58       infinity, -1 if x is negative infinity, and 0 otherwise.
59

ATTRIBUTES

61       For an  explanation  of  the  terms  used  in  this  section,  see  at‐
62       tributes(7).
63
64       ┌────────────────────────────────────────────┬───────────────┬─────────┐
65Interface                                   Attribute     Value   
66       ├────────────────────────────────────────────┼───────────────┼─────────┤
67finite(), finitef(), finitel(), isinf(),    │ Thread safety │ MT-Safe │
68isinff(), isinfl(), isnan(), isnanf(),      │               │         │
69isnanl()                                    │               │         │
70       └────────────────────────────────────────────┴───────────────┴─────────┘
71

NOTES

73       Note that these functions are obsolete.  C99 defines macros isfinite(),
74       isinf(), and isnan() (for all types) replacing them.  Further note that
75       the C99 isinf() has weaker guarantees on the return value.  See fpclas‐
76       sify(3).
77

SEE ALSO

79       fpclassify(3)
80

COLOPHON

82       This page is part of release 5.13 of the Linux  man-pages  project.   A
83       description  of  the project, information about reporting bugs, and the
84       latest    version    of    this    page,    can     be     found     at
85       https://www.kernel.org/doc/man-pages/.
86
87
88
89                                  2021-03-22                         FINITE(3)
Impressum