8 #define FPTYPE_MIN FLT_MIN
9 #define FPTYPE_MIN_EXP FLT_MIN_EXP
10 #define FPTYPE_MANT_DIG FLT_MANT_DIG
11 #define LDEXP(d,e) ldexpf(d,e)
12 #define MODF(d,ip) modff(d,ip)
13 #define FREXP(d,e) frexpf(d,e)
16 #define FPTYPE long double
17 #define FPTYPE_MIN LDBL_MIN
18 #define FPTYPE_MIN_EXP LDBL_MIN_EXP
19 #define FPTYPE_MANT_DIG LDBL_MANT_DIG
20 #define LDEXP(d,e) ldexpl(d,e)
21 #define MODF(d,ip) modfl(d,ip)
22 #define FREXP(d,e) frexpl(d,e)
25 #define FPTYPE_MIN DBL_MIN
26 #define FPTYPE_MIN_EXP DBL_MIN_EXP
27 #define FPTYPE_MANT_DIG DBL_MANT_DIG
28 #define LDEXP(d,e) ldexp(d,e)
29 #define MODF(d,ip) modf(d,ip)
30 #define FREXP(d,e) frexp(d,e)
37 FPTYPE d0
, d1
, d2
, f
, ip
;
41 assert(fpclassify(d0
) == FP_NORMAL
);
43 assert(e
== FPTYPE_MIN_EXP
);
47 /* shift a "1" bit through the mantissa (skip the implicit bit) */
48 for (i
= 1; i
< FPTYPE_MANT_DIG
; i
++) {
50 assert(fpclassify(d1
) == FP_SUBNORMAL
);
51 assert(d1
> 0 && d1
< d0
);
60 assert(e
== FPTYPE_MIN_EXP
- i
);
65 assert(fpclassify(d1
) == FP_ZERO
);