1 /* float.h for target sh3e with optional IEEE 32 bit double format */
4 /* Produced by enquire version 4.3, CWI, Amsterdam */
6 /* Radix of exponent representation */
9 /* Number of base-FLT_RADIX digits in the significand of a float */
11 #define FLT_MANT_DIG 24
12 /* Number of decimal digits of precision in a float */
15 /* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown */
18 /* Difference between 1.0 and the minimum float greater than 1.0 */
20 #define FLT_EPSILON 1.19209290e-07F
21 /* Minimum int x such that FLT_RADIX**(x-1) is a normalised float */
23 #define FLT_MIN_EXP (-125)
24 /* Minimum normalised float */
26 #define FLT_MIN 1.17549435e-38F
27 /* Minimum int x such that 10**x is a normalised float */
29 #define FLT_MIN_10_EXP (-37)
30 /* Maximum int x such that FLT_RADIX**(x-1) is a representable float */
32 #define FLT_MAX_EXP 128
35 #define FLT_MAX 3.40282347e+38F
36 /* Maximum int x such that 10**x is a representable float */
38 #define FLT_MAX_10_EXP 38
40 #if defined (__SH3E__) || defined (__SH4_SINGLE_ONLY__)
42 /* Number of base-FLT_RADIX digits in the significand of a double */
44 #define DBL_MANT_DIG 24
45 /* Number of decimal digits of precision in a double */
48 /* Difference between 1.0 and the minimum double greater than 1.0 */
50 #define DBL_EPSILON 1.19209290e-07F
51 /* Minimum int x such that FLT_RADIX**(x-1) is a normalised double */
53 #define DBL_MIN_EXP (-125)
54 /* Minimum normalised double */
56 #define DBL_MIN 1.17549435e-38F
57 /* Minimum int x such that 10**x is a normalised double */
59 #define DBL_MIN_10_EXP (-37)
60 /* Maximum int x such that FLT_RADIX**(x-1) is a representable double */
62 #define DBL_MAX_EXP 128
65 #define DBL_MAX 3.40282347e+38F
66 /* Maximum int x such that 10**x is a representable double */
68 #define DBL_MAX_10_EXP 38
72 /* Number of base-FLT_RADIX digits in the significand of a double */
74 #define DBL_MANT_DIG 53
75 /* Number of decimal digits of precision in a double */
78 /* Difference between 1.0 and the minimum double greater than 1.0 */
80 #define DBL_EPSILON 2.2204460492503131e-16
81 /* Minimum int x such that FLT_RADIX**(x-1) is a normalised double */
83 #define DBL_MIN_EXP (-1021)
84 /* Minimum normalised double */
86 #define DBL_MIN 2.2250738585072014e-308
87 /* Minimum int x such that 10**x is a normalised double */
89 #define DBL_MIN_10_EXP (-307)
90 /* Maximum int x such that FLT_RADIX**(x-1) is a representable double */
92 #define DBL_MAX_EXP 1024
95 #define DBL_MAX 1.7976931348623157e+308
96 /* Maximum int x such that 10**x is a representable double */
98 #define DBL_MAX_10_EXP 308
102 /* Because -m3e and -m4-single-only have 32-bit doubles, we append L
103 to the doubles below, so that they're not truncated. */
105 /* Number of base-FLT_RADIX digits in the significand of a long double */
107 #define LDBL_MANT_DIG 53
108 /* Number of decimal digits of precision in a long double */
111 /* Difference between 1.0 and the minimum long double greater than 1.0 */
113 #define LDBL_EPSILON 2.2204460492503131e-16L
114 /* Minimum int x such that FLT_RADIX**(x-1) is a normalised long double */
116 #define LDBL_MIN_EXP (-1021)
117 /* Minimum normalised long double */
119 #define LDBL_MIN 2.2250738585072014e-308L
120 /* Minimum int x such that 10**x is a normalised long double */
121 #undef LDBL_MIN_10_EXP
122 #define LDBL_MIN_10_EXP (-307)
123 /* Maximum int x such that FLT_RADIX**(x-1) is a representable long double */
125 #define LDBL_MAX_EXP 1024
126 /* Maximum long double */
128 #define LDBL_MAX 1.7976931348623157e+308L
129 /* Maximum int x such that 10**x is a representable long double */
130 #undef LDBL_MAX_10_EXP
131 #define LDBL_MAX_10_EXP 308
133 #if __STDC_VERSION__ >= 199901L
134 /* The floating-point expression evaluation method.
136 0 evaluate all operations and constants just to the range and
137 precision of the type
138 1 evaluate operations and constants of type float and double
139 to the range and precision of the double type, evaluate
140 long double operations and constants to the range and
141 precision of the long double type
142 2 evaluate all operations and constants to the range and
143 precision of the long double type
145 # undef FLT_EVAL_METHOD
146 # define FLT_EVAL_METHOD 0
148 /* Number of decimal digits to enable rounding to the given number of
149 decimal digits without loss of precision.
150 if FLT_RADIX == 10^n: #mantissa * log10 (FLT_RADIX)
151 else : ceil (1 + #mantissa * log10 (FLT_RADIX))
152 where #mantissa is the number of bits in the mantissa of the widest
153 supported floating-point type.
156 # define DECIMAL_DIG 17
160 #endif /* _FLOAT_H_ */