diff options
author | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2004-03-26 13:27:16 +0000 |
---|---|---|
committer | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2004-03-26 13:27:16 +0000 |
commit | 9f1f8d25b276fcfc67c6e231f9239b2e49646099 (patch) | |
tree | 743d3437a1426c0090f01ae1137e3261f42639a4 /set_d.c | |
parent | 59944129ef3733a50e0628588027047c03646d8f (diff) | |
download | mpfr-9f1f8d25b276fcfc67c6e231f9239b2e49646099.tar.gz |
Change from MP_LIMB_T_ONE to MPFR_LIMB_ONE and/or MPFR_LIMB_MASK.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2858 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'set_d.c')
-rw-r--r-- | set_d.c | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -26,16 +26,15 @@ MA 02111-1307, USA. */ #include "mpfr-impl.h" #if (BITS_PER_MP_LIMB==32) -#define MPFR_LIMBS_PER_DOUBLE 2 +# define MPFR_LIMBS_PER_DOUBLE 2 #elif (BITS_PER_MP_LIMB >= 64) -#define MPFR_LIMBS_PER_DOUBLE 1 +# define MPFR_LIMBS_PER_DOUBLE 1 #else -#error "Unsupported value of BITS_PER_MP_LIMB" +# error "Unsupported value of BITS_PER_MP_LIMB" #endif /* extracts the bits of d in rp[0..n-1] where n=ceil(53/BITS_PER_MP_LIMB). - Assumes d is neither 0 nor NaN nor Inf. - */ + Assumes d is neither 0 nor NaN nor Inf. */ static int __mpfr_extract_double (mp_ptr rp, double d) /* e=0 iff BITS_PER_MP_LIMB=32 and rp has only one limb */ @@ -67,10 +66,10 @@ __mpfr_extract_double (mp_ptr rp, double d) if (exp) { #if BITS_PER_MP_LIMB >= 64 - manl = ((MP_LIMB_T_ONE << 63) + manl = ((MPFR_LIMB_ONE << 63) | ((mp_limb_t) x.s.manh << 43) | ((mp_limb_t) x.s.manl << 11)); #else - manh = (MP_LIMB_T_ONE << 31) | (x.s.manh << 11) | (x.s.manl >> 21); + manh = (MPFR_LIMB_ONE << 31) | (x.s.manh << 11) | (x.s.manl >> 21); manl = x.s.manl << 11; #endif } |