(atof_generic): Calculate maximum number of useful digits in integer
[deliverable/binutils-gdb.git] / gas / atof-generic.c
index b55945a67e03460a3e30cebd88e9c6102d8cb673..6d6d1955fb2eee1c7f10f1e3a7af781d2d140157 100644 (file)
@@ -319,10 +319,19 @@ atof_generic (address_of_string_pointer,
                   + 1);        /* Number of destination littlenums. */
 
       /* Includes guard bits (two littlenums worth) */
+#if 0 /* The integer version below is very close, and it doesn't
+        require floating point support (which is currently buggy on
+        the Alpha).  */
       maximum_useful_digits = (((double) (precision - 2))
                               * ((double) (LITTLENUM_NUMBER_OF_BITS))
                               / (LOG_TO_BASE_2_OF_10))
        + 2;                    /* 2 :: guard digits. */
+#else
+      maximum_useful_digits = (((precision - 2))
+                              * ( (LITTLENUM_NUMBER_OF_BITS))
+                              * 1000000 / 3321928)
+       + 2;                    /* 2 :: guard digits. */
+#endif
 
       if (number_of_digits_available > maximum_useful_digits)
        {
This page took 0.024838 seconds and 4 git commands to generate.