[project @ 1996-07-25 20:43:49 by partain]
[ghc-hetmet.git] / ghc / includes / ieee-flpt.h
1 /* this file is #included into both C (.c and .hc) and Haskell files */
2
3     /* IEEE format floating-point */
4 #define IEEE_FLOATING_POINT 1
5
6    /* Radix of exponent representation */
7 #ifndef FLT_RADIX
8 # define FLT_RADIX 2
9 #endif
10
11    /* Number of base-FLT_RADIX digits in the significand of a float */
12 #ifndef FLT_MANT_DIG
13 # define FLT_MANT_DIG 24
14 #endif
15    /* Minimum int x such that FLT_RADIX**(x-1) is a normalised float */
16 #ifndef FLT_MIN_EXP
17 # ifdef __GLASGOW_HASKELL__
18 #  define FLT_MIN_EXP (negate 125)
19 # else
20 #  define FLT_MIN_EXP (-125)
21 # endif
22 #endif
23    /* Maximum int x such that FLT_RADIX**(x-1) is a representable float */
24 #ifndef FLT_MAX_EXP
25 # define FLT_MAX_EXP 128
26 #endif
27
28    /* Number of base-FLT_RADIX digits in the significand of a double */
29 #ifndef DBL_MANT_DIG
30 # define DBL_MANT_DIG 53
31 #endif
32    /* Minimum int x such that FLT_RADIX**(x-1) is a normalised double */
33 #ifndef DBL_MIN_EXP
34 # ifdef __GLASGOW_HASKELL__
35 #  define DBL_MIN_EXP (negate 1021)
36 # else
37 #  define DBL_MIN_EXP (-1021)
38 # endif
39 #endif
40    /* Maximum int x such that FLT_RADIX**(x-1) is a representable double */
41 #ifndef DBL_MAX_EXP
42 # define DBL_MAX_EXP 1024
43 #endif