summaryrefslogtreecommitdiff
path: root/set_z.c
diff options
context:
space:
mode:
authorpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2004-03-26 13:27:16 +0000
committerpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2004-03-26 13:27:16 +0000
commit9f1f8d25b276fcfc67c6e231f9239b2e49646099 (patch)
tree743d3437a1426c0090f01ae1137e3261f42639a4 /set_z.c
parent59944129ef3733a50e0628588027047c03646d8f (diff)
downloadmpfr-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_z.c')
-rw-r--r--set_z.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/set_z.c b/set_z.c
index 6041a84c4..cb9d64468 100644
--- a/set_z.c
+++ b/set_z.c
@@ -87,7 +87,7 @@ mpfr_set_z (mpfr_ptr f, mpz_srcptr z, mp_rnd_t rnd_mode)
MPN_COPY(fp, zp + dif, fn);
sh = (mp_prec_t) fn * BITS_PER_MP_LIMB - MPFR_PREC(f);
- cc = fp[0] & ((MP_LIMB_T_ONE << sh) - 1);
+ cc = fp[0] & MPFR_LIMB_MASK (sh);
fp[0] &= ~cc;
to0 = rnd_mode == GMP_RNDZ
@@ -103,7 +103,7 @@ mpfr_set_z (mpfr_ptr f, mpz_srcptr z, mp_rnd_t rnd_mode)
{
mp_limb_t rb;
- rb = MP_LIMB_T_ONE << (sh - 1);
+ rb = MPFR_LIMB_ONE << (sh - 1);
if ((cc & rb) == 0)
to0 = 1; /* rounding bit is 0 */
else
@@ -128,7 +128,7 @@ mpfr_set_z (mpfr_ptr f, mpz_srcptr z, mp_rnd_t rnd_mode)
if (!to0 && cc == 0) /* even rounding */
{
cc = 1;
- if ((fp[0] & (MP_LIMB_T_ONE << sh)) == 0)
+ if ((fp[0] & (MPFR_LIMB_ONE << sh)) == 0)
to0 = 1;
}
} /* rnd_mode == GMP_RNDN */
@@ -145,7 +145,7 @@ mpfr_set_z (mpfr_ptr f, mpz_srcptr z, mp_rnd_t rnd_mode)
inex = -sign_z;
else
{
- if (mpn_add_1(fp, fp, fn, MP_LIMB_T_ONE << sh))
+ if (mpn_add_1(fp, fp, fn, MPFR_LIMB_ONE << sh))
{
if (exp == __gmpfr_emax)
return mpfr_set_overflow(f, rnd_mode, sign_z);