1 ?RCS: Copyright (c) 2000,2014 Jarkko Hietaniemi
3 ?RCS: You may distribute under the terms of either the GNU General Public
4 ?RCS: License or the Artistic License, as specified in the README file.
6 ?MAKE:d_fpclassify d_fp_classify: Inlibc cat i_math Compile rm_try Setvar
8 ?X:the short story is that C99 says use fpclassify. But the story is confused
9 ?X:by systems "partially C99" (or fully "pre C99") which either user fpclassify
10 ?X:but with different return values, or they use fp_classify (with the expected)
11 ?X:return values, or they use some other spelling of *fp*class* (sometimes even
12 ?X:without the *fp* part), with yet another set(s) of return values ...
14 ?S: This variable conditionally defines the HAS_FPCLASSIFY symbol, which
15 ?S: indicates to the C program that the fpclassify() routine is available.
18 ?S: This variable conditionally defines the HAS_FP_CLASSIFY symbol, which
19 ?S: indicates to the C program that the fp_classify() routine is available.
22 ?C: This symbol, if defined, indicates that the fpclassify routine is
23 ?C: available to classify doubles. Available for example in HP-UX.
24 ?C: The returned values are defined in <math.h> and are
26 ?C: FP_NORMAL Normalized
28 ?C: FP_INFINITE Infinity
29 ?C: FP_SUBNORMAL Denormalized
34 ?C: This symbol, if defined, indicates that the fp_classify routine is
35 ?C: available to classify doubles. The values are defined in <math.h>
37 ?C: FP_NORMAL Normalized
39 ?C: FP_INFINITE Infinity
40 ?C: FP_SUBNORMAL Denormalized
44 ?H:#$d_fpclassify HAS_FPCLASSIFY /**/
45 ?H:#$d_fp_classify HAS_FP_CLASSIFY /**/
47 ?LINT:set d_fpclassify
48 ?LINT:set d_fp_classify
49 : check for fpclassify
50 ?X:classified (Comment by jhi)
53 ?X:fpclass i_math i_ieeefp i_fp
54 ?X:fp_class i_math i_fp_class
55 ?X: No i_fp_class yet. But the systems that have
56 ?X: this (Tru64 and IRIX) both had <fp_class.h>
58 echo "Checking to see if you have fpclassify..." >&4
64 int main() { return fpclassify(1.0) == FP_NORMAL ? 0 : 1; }
67 if eval $compile; then
69 echo "You have fpclassify."
72 echo "You do not have fpclassify."
78 : see if fp_classify exists
79 set fp_classify d_fp_classify