Commit 165d57cc by Ulrich Drepper

Define FLT_EVAL_METHOD and DECIMAL_DIG for C99.

From-SVN: r38936
parent b660f82f
...@@ -94,4 +94,31 @@ ...@@ -94,4 +94,31 @@
#undef LDBL_MAX_10_EXP #undef LDBL_MAX_10_EXP
#define LDBL_MAX_10_EXP 4932 #define LDBL_MAX_10_EXP 4932
#if __STDC_VERSION__ >= 199901L
/* The floating-point expression evaluation method.
-1 indeterminate
0 evaluate all operations and constants just to the range and
precision of the type
1 evaluate operations and constants of type float and double
to the range and precision of the double type, evaluate
long double operations and constants to the range and
precision of the long double type
2 evaluate all operations and constants to the range and
precision of the long double type
*/
# undef FLT_EVAL_METHOD
# define FLT_EVAL_METHOD 2
/* Number of decimal digits to enable rounding to the given number of
decimal digits without loss of precision.
if FLT_RADIX == 10^n: #mantissa * log10 (FLT_RADIX)
else : ceil (1 + #mantissa * log10 (FLT_RADIX))
where #mantissa is the number of bits in the mantissa of the widest
supported floating-point type.
*/
# undef DECIMAL_DIG
# define DECIMAL_DIG 21
#endif /* C99 */
#endif /* _FLOAT_H___ */ #endif /* _FLOAT_H___ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment