diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2003-06-26 13:40:08 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2003-06-26 13:40:08 +0000 |
commit | 3bd252817f1048db139cc3e1a34e850f7b67abdd (patch) | |
tree | 4514fed625fe252e786378cddfac6d7405507e93 /mpfr-impl.h | |
parent | e81472a1d9c12d70c474f2fe93c5020e412ec993 (diff) | |
download | mpfr-3bd252817f1048db139cc3e1a34e850f7b67abdd.tar.gz |
moved macros for [L]DBL_MANT_DIG in mpfr-impl.h
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2373 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'mpfr-impl.h')
-rw-r--r-- | mpfr-impl.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mpfr-impl.h b/mpfr-impl.h index 4111758fa..11ed4d4ca 100644 --- a/mpfr-impl.h +++ b/mpfr-impl.h @@ -117,6 +117,10 @@ typedef unsigned long int mp_size_unsigned_t; /* macros for doubles, based on gmp union ieee_double_extract */ +#ifndef IEEE_DBL_MANT_DIG +#define IEEE_DBL_MANT_DIG 53 +#endif + typedef union ieee_double_extract Ieee_double_extract; /* for x of type ieee_double_extract */ @@ -132,6 +136,23 @@ typedef union ieee_double_extract Ieee_double_extract; #define DBL_NEG_INF (-1.0/0.0) #define DBL_NAN (0.0/0.0) +/* macros for long doubles */ + +/* we only require that LDBL_MANT_DIG is a bound on the mantissa length + of the "long double" type */ +#ifndef LDBL_MANT_DIG +#define LDBL_MANT_DIG 113 /* works also if long double == quad */ +#endif + +/* Various i386 systems have been seen with incorrect LDBL constants in + float.h (notes in set_ld.c), so force the value we know is right for IEEE + extended. */ + +#if HAVE_LDOUBLE_IEEE_EXT_LITTLE +#define MPFR_LDBL_MANT_DIG 64 +#else +#define MPFR_LDBL_MANT_DIG LDBL_MANT_DIG +#endif /* LONGDOUBLE_NAN_ACTION executes the code "action" if x is a NaN. */ |