1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2 .\" Distributed under GPL, 2002-07-27 Walter Harms
3 .\" This was done with the help of the glibc manual.
5 .\" 2004-10-31, aeb, corrected
6 .TH FPCLASSIFY 3 2007-07-26 "" "Linux Programmer's Manual"
8 fpclassify, isfinite, isnormal, isnan, isinf \- floating-point
14 .BI "int fpclassify(" x );
16 .BI "int isfinite(" x );
18 .BI "int isnormal(" x );
28 Feature Test Macro Requirements for glibc (see
29 .BR feature_test_macros (7)):
32 .\" I haven't fully grokked the source to determine the FTM requirements;
33 .\" in part, the following has been tested by experiment.
38 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE; or
42 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE || _ISOC99_SOURCE; or
46 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE; or
50 Floating point numbers can have special values, such as
54 you can find out what type
57 The macro takes any floating-point expression as argument.
58 The result is one of the following values:
66 is either plus or minus infinity.
74 is too small to be represented in normalized format.
77 if nothing of the above is correct then it must be a
78 normal floating-point number.
80 The other macros provide a short answer to some standard questions.
83 returns a non-zero value if
85 (fpclassify(x) != FP_NAN && fpclassify(x) != FP_INFINITE)
88 returns a non-zero value if
89 (fpclassify(x) == FP_NORMAL)
92 returns a non-zero value if
93 (fpclassify(x) == FP_NAN)
98 is positive infinity, and \-1 if
100 is negative infinity.
104 In glibc 2.01 and earlier,
106 returns a non-zero value (actually: 1) if
108 is an infinity (positive or negative).
109 (This is all that C99 requires.)