Eliminate hand-coded flonum parameters in favor of those in "float.h".
authorChris Hanson <org/chris-hanson/cph>
Sun, 24 Sep 1989 15:13:11 +0000 (15:13 +0000)
committerChris Hanson <org/chris-hanson/cph>
Sun, 24 Sep 1989 15:13:11 +0000 (15:13 +0000)
These new parameters can be generated by hard-params, or if the system
has <float.h> we can use that instead.

v7/src/microcode/boot.c
v7/src/microcode/config.h
v7/src/microcode/flonum.c
v7/src/microcode/intprm.c
v7/src/microcode/object.h
v7/src/microcode/psbtobin.c
v7/src/microcode/scheme.h
v7/src/microcode/unxutl/ymkfile
v8/src/microcode/object.h
v8/src/microcode/psbtobin.c

index c57bb1546eb482462d3e116b42f7ee8e520ff135..4b27339ebbbd3c582dfe11d4ce62bdfcab14a491 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/boot.c,v 9.57 1989/09/20 23:06:26 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/boot.c,v 9.58 1989/09/24 15:12:48 cph Exp $
 
 Copyright (c) 1988, 1989 Massachusetts Institute of Technology
 
@@ -703,7 +703,7 @@ gc_death(code, message, scan, free)
 #define ID_PRINTER_LENGTH      4       /* TTY height (# chars) */
 #define ID_NEW_LINE_CHARACTER  5       /* #\Newline */
 #define ID_FLONUM_PRECISION    6       /* Flonum mantissa (# bits) */
-#define ID_FLONUM_EXPONENT     7       /* Flonum exponent (# bits) */
+#define ID_FLONUM_EPSILON      7       /* Flonum epsilon (flonum) */
 #define ID_OS_NAME             8       /* OS name (string) */
 #define ID_OS_VARIANT          9       /* OS variant (string) */
 #define ID_STACK_TYPE          10      /* Scheme stack type (string) */
@@ -732,10 +732,9 @@ DEFINE_PRIMITIVE ("MICROCODE-IDENTIFY", Prim_microcode_identify, 0, 0, 0)
   FAST_VECTOR_SET
     (Result, ID_NEW_LINE_CHARACTER, (ASCII_TO_CHAR ('\n')));
   FAST_VECTOR_SET
-    (Result, ID_FLONUM_PRECISION,
-     (LONG_TO_UNSIGNED_FIXNUM (FLONUM_MANTISSA_BITS)));
+    (Result, ID_FLONUM_PRECISION, (LONG_TO_UNSIGNED_FIXNUM (DBL_MANT_DIG)));
   FAST_VECTOR_SET
-    (Result, ID_FLONUM_EXPONENT, (LONG_TO_UNSIGNED_FIXNUM (FLONUM_EXPT_SIZE)));
+    (Result, ID_FLONUM_EPSILON, (double_to_flonum ((double) DBL_EPSILON)));
   FAST_VECTOR_SET
     (Result, ID_OS_NAME, (char_pointer_to_string (OS_Name)));
   FAST_VECTOR_SET
index 51272582c0dd361a8318241c18d35c95e24b1520..4439e1fa8f232a9083571ce0597051187669dc3f 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/config.h,v 9.48 1989/09/22 08:44:46 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/config.h,v 9.49 1989/09/24 15:12:53 cph Exp $
 
 Copyright (c) 1987, 1988, 1989 Massachusetts Institute of Technology
 
@@ -121,6 +121,9 @@ typedef unsigned long SCHEME_OBJECT;
 
    ULONG_SIZE is the size of an unsigned long in bits.
 
+   ******** The following flonum constants have been superseded by the
+   use of "float.h". ********
+
    FLONUM_EXPT_SIZE is the number of bits in the largest positive
    exponent of a (double) floating point number.
    Note that if excess exponents are used in the representation,
@@ -237,9 +240,9 @@ typedef unsigned long SCHEME_OBJECT;
 #define ULONG_SIZE             32
 #define BELL                   '\007'
 #define FASL_INTERNAL_FORMAT   FASL_68000
-#define FLONUM_EXPT_SIZE       7
-#define FLONUM_MANTISSA_BITS   56
-#define MAX_FLONUM_EXPONENT    127
+/* #define FLONUM_EXPT_SIZE    7 */
+/* #define FLONUM_MANTISSA_BITS        56 */
+/* #define MAX_FLONUM_EXPONENT 127 */
 #define HAS_FREXP
 #ifdef quick
 /* Bignum code fails for certain variables in registers because of a
@@ -263,9 +266,9 @@ typedef unsigned long SCHEME_OBJECT;
 #define ULONG_SIZE             32
 #define BELL                   '\007'
 #define FASL_INTERNAL_FORMAT   FASL_VAX
-#define FLONUM_EXPT_SIZE       7
-#define FLONUM_MANTISSA_BITS   56   /* D format */
-#define MAX_FLONUM_EXPONENT    127
+/* #define FLONUM_EXPT_SIZE    7 */
+/* #define FLONUM_MANTISSA_BITS        56    D format */
+/* #define MAX_FLONUM_EXPONENT 127 */
 #define HAS_FLOOR
 #define HAS_FREXP
 #define HAS_MODF
@@ -331,9 +334,9 @@ longjmp(Exit_Point, NORMAL_EXIT)
 #else /* not MC68020 */
 #define FASL_INTERNAL_FORMAT   FASL_68000
 #endif /* MC68020 */
-#define FLONUM_EXPT_SIZE       10
-#define FLONUM_MANTISSA_BITS   53
-#define MAX_FLONUM_EXPONENT    1023
+/* #define FLONUM_EXPT_SIZE    10 */
+/* #define FLONUM_MANTISSA_BITS        53 */
+/* #define MAX_FLONUM_EXPONENT 1023 */
 #define HAS_FLOOR
 #define HAS_FREXP
 #define HAS_MODF
@@ -353,9 +356,9 @@ longjmp(Exit_Point, NORMAL_EXIT)
 #define ULONG_SIZE             32
 #define BELL                   '\007'
 #define FASL_INTERNAL_FORMAT   FASL_HP_9000_500
-#define FLONUM_EXPT_SIZE       10
-#define FLONUM_MANTISSA_BITS   53
-#define MAX_FLONUM_EXPONENT    1023
+/* #define FLONUM_EXPT_SIZE    10 */
+/* #define FLONUM_MANTISSA_BITS        53 */
+/* #define MAX_FLONUM_EXPONENT 1023 */
 #define HAS_FLOOR
 #define HAS_FREXP
 #define HAS_MODF
@@ -375,9 +378,9 @@ longjmp(Exit_Point, NORMAL_EXIT)
 #define ULONG_SIZE             32
 #define BELL                   '\007'
 
-#define FLONUM_EXPT_SIZE       10
-#define FLONUM_MANTISSA_BITS   53
-#define MAX_FLONUM_EXPONENT    1023
+/* #define FLONUM_EXPT_SIZE    10 */
+/* #define FLONUM_MANTISSA_BITS        53 */
+/* #define MAX_FLONUM_EXPONENT 1023 */
 
 #ifdef sun4
 #define MACHINE_TYPE           "sun4"
@@ -410,9 +413,9 @@ longjmp(Exit_Point, NORMAL_EXIT)
 #define ULONG_SIZE             32
 #define BELL                   '\007'
 #define FASL_INTERNAL_FORMAT   FASL_BFLY
-#define FLONUM_EXPT_SIZE       7
-#define FLONUM_MANTISSA_BITS   56
-#define MAX_FLONUM_EXPONENT    127
+/* #define FLONUM_EXPT_SIZE    7 */
+/* #define FLONUM_MANTISSA_BITS        56 */
+/* #define MAX_FLONUM_EXPONENT 127 */
 #include <public.h>
 #define HAS_FREXP
 #define HAS_MODF
@@ -428,10 +431,10 @@ longjmp(Exit_Point, NORMAL_EXIT)
 #define ULONG_SIZE             ???
 #define BELL                   '\007'
 #define FASL_INTERNAL_FORMAT   FASL_CYBER
-#define FLONUM_EXPT_SIZE       14
-#define FLONUM_MANTISSA_BITS   48
+/* #define FLONUM_EXPT_SIZE    14 */
+/* #define FLONUM_MANTISSA_BITS        48 */
 /* Not the full range, or so the manual says. */
-#define MAX_FLONUM_EXPONENT    4095
+/* #define MAX_FLONUM_EXPONENT 4095 */
 /* The Cyber180 C compiler manifests a bug in hairy conditional
    expressions */
 #define Conditional_Bug
@@ -446,9 +449,9 @@ longjmp(Exit_Point, NORMAL_EXIT)
 #define ULONG_SIZE             32
 #define BELL                   '\007'
 #define FASL_INTERNAL_FORMAT   FASL_CELERITY
-#define FLONUM_EXPT_SIZE       11
-#define FLONUM_MANTISSA_BITS   53
-#define MAX_FLONUM_EXPONENT    2047
+/* #define FLONUM_EXPT_SIZE    11 */
+/* #define FLONUM_MANTISSA_BITS        53 */
+/* #define MAX_FLONUM_EXPONENT 2047 */
 #endif
 \f
 #ifdef hp9000s800
@@ -459,9 +462,9 @@ longjmp(Exit_Point, NORMAL_EXIT)
 #define ULONG_SIZE             32
 #define BELL                   '\007'
 #define FASL_INTERNAL_FORMAT   FASL_HP_SPECTRUM
-#define FLONUM_EXPT_SIZE       10
-#define FLONUM_MANTISSA_BITS   53
-#define MAX_FLONUM_EXPONENT    1023
+/* #define FLONUM_EXPT_SIZE    10 */
+/* #define FLONUM_MANTISSA_BITS        53 */
+/* #define MAX_FLONUM_EXPONENT 1023 */
 #define FLOATING_ALIGNMENT     0x7     /* Low 3 MBZ for float storage */
 #define HAS_FLOOR
 #define HAS_FREXP
@@ -500,9 +503,9 @@ longjmp(Exit_Point, NORMAL_EXIT)
 #define DBFLT_SIZE             64
 #define BELL                   '\007'
 #define FASL_INTERNAL_FORMAT   FASL_UMAX
-#define FLONUM_EXPT_SIZE       10
-#define FLONUM_MANTISSA_BITS   53
-#define MAX_FLONUM_EXPONENT    1023
+/* #define FLONUM_EXPT_SIZE    10 */
+/* #define FLONUM_MANTISSA_BITS        53 */
+/* #define MAX_FLONUM_EXPONENT 1023 */
 #define HAS_FLOOR
 #define HAS_FREXP
 #define HAS_MODF
@@ -517,9 +520,9 @@ longjmp(Exit_Point, NORMAL_EXIT)
 #define ULONG_SIZE             32
 #define BELL                   '\007'
 #define FASL_INTERNAL_FORMAT   FASL_PYR
-#define FLONUM_EXPT_SIZE       10
-#define FLONUM_MANTISSA_BITS   53
-#define MAX_FLONUM_EXPONENT    1023
+/* #define FLONUM_EXPT_SIZE    10 */
+/* #define FLONUM_MANTISSA_BITS        53 */
+/* #define MAX_FLONUM_EXPONENT 1023 */
 #endif
 
 #ifdef alliant
@@ -531,9 +534,9 @@ longjmp(Exit_Point, NORMAL_EXIT)
 #define ULONG_SIZE             32
 #define BELL                   '\007'
 #define FASL_INTERNAL_FORMAT   FASL_ALLIANT
-#define FLONUM_EXPT_SIZE       10
-#define FLONUM_MANTISSA_BITS   53
-#define MAX_FLONUM_EXPONENT    1023
+/* #define FLONUM_EXPT_SIZE    10 */
+/* #define FLONUM_MANTISSA_BITS        53 */
+/* #define MAX_FLONUM_EXPONENT 1023 */
 #define HAS_FLOOR
 #define HAS_FREXP
 #define HAS_MODF
@@ -549,9 +552,9 @@ longjmp(Exit_Point, NORMAL_EXIT)
 #define ULONG_SIZE             32
 /* Flonum (double) size is 64 bits. */
 #define FLOATING_ALIGNMENT     0x7
-#define FLONUM_MANTISSA_BITS   53
-#define FLONUM_EXPT_SIZE       10
-#define MAX_FLONUM_EXPONENT    1023
+/* #define FLONUM_MANTISSA_BITS        53 */
+/* #define FLONUM_EXPT_SIZE            10 */
+/* #define MAX_FLONUM_EXPONENT         1023 */
 /* Floating point representation uses hidden bit. */\r
 #define FASL_INTERNAL_FORMAT   FASL_MIPS
 #define BELL                   '\007'
index 7163cb883ae5bd677f71a7077639445c9c210bd6..89e5b413186f74f31866fa97d61651ad6ba37157 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/flonum.c,v 9.28 1989/09/24 13:49:21 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/flonum.c,v 9.29 1989/09/24 15:12:57 cph Exp $
 
 Copyright (c) 1987, 1988, 1989 Massachusetts Institute of Technology
 
@@ -261,19 +261,3 @@ DEFINE_PRIMITIVE ("FLONUM-NORMALIZE", Prim_flonum_normalize, 1, 1, 0)
   CHECK_ARG (1, FLONUM_P);
   PRIMITIVE_RETURN (flonum_normalize (ARG_REF (1))); 
 }
-
-#include "float.h"
-#if (FLT_RADIX != 2)
-#include "error: floating point radix not 2!  Arithmetic won't work."
-#endif
-
-#define FLONUM_CONSTANT(expression)                                    \
-{                                                                      \
-  PRIMITIVE_HEADER (0);                                                        \
-  PRIMITIVE_RETURN (expression);                                       \
-}
-
-DEFINE_PRIMITIVE ("FLONUM-MANTISSA-DIGITS", Prim_flonum_mantissa_digits, 0, 0, 0)
-     FLONUM_CONSTANT (long_to_integer (DBL_MANT_DIG))
-DEFINE_PRIMITIVE ("FLONUM-EPSILON", Prim_flonum_epsilon, 0, 0, 0)
-     FLONUM_CONSTANT (double_to_flonum ((double) DBL_EPSILON))
index f893040f9d32d6bff2c299420d623c67c051b3da..e0a6ecd0445c57f22353103ded4688b1f8efb9ab 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/intprm.c,v 1.1 1989/09/20 23:23:20 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/intprm.c,v 1.2 1989/09/24 15:13:01 cph Exp $
 
 Copyright (c) 1989 Massachusetts Institute of Technology
 
@@ -151,7 +151,7 @@ DEFINE_PRIMITIVE ("INTEGER->FLONUM", Prim_integer_to_flonum, 2, 2, 0)
       PRIMITIVE_RETURN (FIXNUM_TO_FLONUM (integer));
     if (bignum_fits_in_word_p
        (integer,
-        (((control & 1) != 0) ? FLONUM_MANTISSA_BITS : MAX_FLONUM_EXPONENT),
+        (((control & 1) != 0) ? DBL_MANT_DIG : DBL_MAX_EXP),
         0))
       PRIMITIVE_RETURN (BIGNUM_TO_FLONUM (integer));
     if ((control & 2) != 0)
index 70aa68a07da1944eec11df7897ef3173120756b6..ba329697c05f7abfe73d459af38db165c7769536 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/object.h,v 9.32 1989/09/20 23:10:26 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/object.h,v 9.33 1989/09/24 15:13:04 cph Exp $
 
 Copyright (c) 1987, 1988, 1989 Massachusetts Institute of Technology
 
@@ -433,9 +433,9 @@ extern SCHEME_OBJECT * memory_base;
   (bignum_fits_in_word_p ((bignum), ((sizeof (long)) * CHAR_BIT), 1))
 
 /* If precision should not be lost,
-   compare to FLONUM_MANTISSA_BITS instead. */
+   compare to DBL_MANT_DIG instead. */
 #define BIGNUM_TO_DOUBLE_P(bignum)                                     \
-  (bignum_fits_in_word_p ((bignum), MAX_FLONUM_EXPONENT, 0))
+  (bignum_fits_in_word_p ((bignum), DBL_MAX_EXP, 0))
 
 /* Flonum Operations */
 
index 66a29622de7166c79b566cdd1b15861b582ec986..b7b3a80e1b0a268f89f4fe6bd7233b0784eca171 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/psbtobin.c,v 9.37 1989/09/21 22:53:12 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/psbtobin.c,v 9.38 1989/09/24 15:12:41 cph Exp $
 
 Copyright (c) 1987, 1989 Massachusetts Institute of Technology
 
@@ -400,7 +400,7 @@ compute_max()
   fast int expt;
 
   Result = 0.0;
-  for (expt = MAX_FLONUM_EXPONENT;
+  for (expt = DBL_MAX_EXP;
        expt != 0;
        expt >>= 1)
   {
@@ -469,8 +469,7 @@ read_a_flonum ()
   size_in_bits = (read_signed_decimal (portable_file));
   if (size_in_bits == 0)
     return (0);
-  if ((exponent > MAX_FLONUM_EXPONENT) ||
-      (exponent < -MAX_FLONUM_EXPONENT))
+  if ((exponent > DBL_MAX_EXP) || (exponent < DBL_MIN_EXP))
   {
     /* Skip over mantissa */
 
@@ -488,7 +487,7 @@ read_a_flonum ()
     fast double Normalization;
     long digit;
 
-    if (size_in_bits > FLONUM_MANTISSA_BITS)
+    if (size_in_bits > DBL_MAN_DIG)
     {
       fprintf(stderr,
              "%s: Some precision may be lost.",
index 91fe8890e22514e226c5063920fa1b8c8ec7bc75..6a7e62e261adf23e205377498e89d7a7695f0bbf 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/scheme.h,v 9.30 1989/09/20 23:11:23 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/scheme.h,v 9.31 1989/09/24 15:13:08 cph Exp $
 
 Copyright (c) 1987, 1988, 1989 Massachusetts Institute of Technology
 
@@ -96,3 +96,8 @@ MIT in each case. */
 #include "extern.h"    /* External declarations */
 #include "bignum.h"    /* Bignum declarations */
 #include "prim.h"      /* Declarations for primitives. */
+#include "float.h"     /* Floating-point parameters */
+#if (FLT_RADIX != 2)
+#include "error: floating point radix not 2!  Arithmetic won't work."
+#endif
+
index 24700e93d6a4426bd182363a0f63d9c362a7ad7b..5fa531c6bf64128a0537bf981dc38d5df8a16642 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/unxutl/Attic/ymkfile,v 1.12 1989/09/24 13:50:26 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/unxutl/Attic/ymkfile,v 1.13 1989/09/24 15:13:11 cph Exp $
 
 Copyright (c) 1989 Massachusetts Institute of Technology
 
@@ -428,7 +428,7 @@ scheme.touch os.touch psbmap.touch usrdef.touch :
 /* scheme.touch depends also on butterfly.h rename.c */
 scheme.touch : scheme.h config.h bkpt.h object.h scode.h sdata.h \
        gc.h interp.h stack.h futures.h types.h errors.h returns.h \
-       const.h fixobj.h default.h extern.h prim.h intrpt.h
+       const.h fixobj.h default.h extern.h prim.h intrpt.h float.h
 os.touch : os.c mul.c unix.c vms.c unknown.c scheme.touch zones.h
 psbmap.touch : config.h object.h bignum.h bignumint.h bitstr.h types.h \
        sdata.h const.h psbmap.h $(GC_HEAD_FILES) comlin.h comlin.c
@@ -468,8 +468,7 @@ memmag.o gcloop.o purify.o purutl.o comutl.o : scheme.touch prims.h \
 
 artutl.o : scheme.touch
 bignum.o : scheme.touch bignumint.h
-bigprm.o intprm.o generic.o : scheme.touch prims.h zones.h
-flonum.o : scheme.touch prims.h zones.h float.h
+bigprm.o flonum.o intprm.o generic.o : scheme.touch prims.h zones.h
 
 storage.o : scheme.touch gctype.c
 
index 15a7380f3a2bfade3bada8345add744e13821614..a4ab711e0b627b753c01bf3afb813cda4619b5ac 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/object.h,v 9.32 1989/09/20 23:10:26 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/object.h,v 9.33 1989/09/24 15:13:04 cph Exp $
 
 Copyright (c) 1987, 1988, 1989 Massachusetts Institute of Technology
 
@@ -433,9 +433,9 @@ extern SCHEME_OBJECT * memory_base;
   (bignum_fits_in_word_p ((bignum), ((sizeof (long)) * CHAR_BIT), 1))
 
 /* If precision should not be lost,
-   compare to FLONUM_MANTISSA_BITS instead. */
+   compare to DBL_MANT_DIG instead. */
 #define BIGNUM_TO_DOUBLE_P(bignum)                                     \
-  (bignum_fits_in_word_p ((bignum), MAX_FLONUM_EXPONENT, 0))
+  (bignum_fits_in_word_p ((bignum), DBL_MAX_EXP, 0))
 
 /* Flonum Operations */
 
index 7dd4b9981aeb4dc63939479194955cab9753250c..a9c2ba8e329d3ac7277ff026518997657ffd99d3 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/psbtobin.c,v 9.37 1989/09/21 22:53:12 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/psbtobin.c,v 9.38 1989/09/24 15:12:41 cph Exp $
 
 Copyright (c) 1987, 1989 Massachusetts Institute of Technology
 
@@ -400,7 +400,7 @@ compute_max()
   fast int expt;
 
   Result = 0.0;
-  for (expt = MAX_FLONUM_EXPONENT;
+  for (expt = DBL_MAX_EXP;
        expt != 0;
        expt >>= 1)
   {
@@ -469,8 +469,7 @@ read_a_flonum ()
   size_in_bits = (read_signed_decimal (portable_file));
   if (size_in_bits == 0)
     return (0);
-  if ((exponent > MAX_FLONUM_EXPONENT) ||
-      (exponent < -MAX_FLONUM_EXPONENT))
+  if ((exponent > DBL_MAX_EXP) || (exponent < DBL_MIN_EXP))
   {
     /* Skip over mantissa */
 
@@ -488,7 +487,7 @@ read_a_flonum ()
     fast double Normalization;
     long digit;
 
-    if (size_in_bits > FLONUM_MANTISSA_BITS)
+    if (size_in_bits > DBL_MAN_DIG)
     {
       fprintf(stderr,
              "%s: Some precision may be lost.",