float.h again

Ulrich Drepper drepper@redhat.com
Thu Jan 11 09:16:00 GMT 2001


I've sent a patch like this quite some time back and got only one
reply pointing out a duplication.  Here it is again, with the problem
removed.  I'm using this patch in my tree (and the system itself) for
weeks without problems.

Can I check it in?  The comments added should be sufficient for others
to fill in the details for other architectures.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Index: gcc/config/float-i386.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/float-i386.h,v
retrieving revision 1.3
diff -u -u -r1.3 float-i386.h
--- gcc/config/float-i386.h	2000/08/22 18:48:57	1.3
+++ gcc/config/float-i386.h	2001/01/11 17:08:59
@@ -94,4 +94,31 @@
 #undef LDBL_MAX_10_EXP
 #define LDBL_MAX_10_EXP 4932
 
+#if __STDC_VERSION__ >= 199901L
+   /* The floating-point expression evaluation method.
+        -1  indeterminable
+         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
+      support floating-point type.
+   */
+# undef DECIMAL_DIG
+# define DECIMAL_DIG	21
+
+#endif	/* C99 */
+
 #endif /*  _FLOAT_H___ */


More information about the Gcc-patches mailing list