summaryrefslogtreecommitdiff
path: root/mpfr-impl.h
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2001-07-06 12:32:13 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2001-07-06 12:32:13 +0000
commit826925a7f33c8bbe6722ea57abfc2b895b4cf6a4 (patch)
tree871a22fbe5cf4551ae4f355dd2456cb29fecfcf9 /mpfr-impl.h
parent16aa9d36cd1bf2c7a46e2f99c231f953549ff9b4 (diff)
downloadmpfr-826925a7f33c8bbe6722ea57abfc2b895b4cf6a4.tar.gz
macros MPFR_NOTZERO and MPFR_ISZERO did not work properly with 64-bit words
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1102 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'mpfr-impl.h')
-rw-r--r--mpfr-impl.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/mpfr-impl.h b/mpfr-impl.h
index 41c62ae9f..6e9943cbe 100644
--- a/mpfr-impl.h
+++ b/mpfr-impl.h
@@ -56,9 +56,9 @@ typedef union ieee_double_extract Ieee_double_extract;
#define MPFR_CHANGE_SIGN(x) (MPFR_SIZE(x) ^= (((mp_size_t)1)<<31))
#define MPFR_SET_SAME_SIGN(x, y) if (MPFR_SIGN((x)) != MPFR_SIGN((y))) { MPFR_CHANGE_SIGN((x)); }
#define MPFR_PREC(x) ((x)->_mpfr_prec)
-#define MPFR_NOTZERO(x) (MPFR_MANT(x)[(MPFR_PREC(x)-1)/BITS_PER_MP_LIMB])
-#define MPFR_IS_ZERO(x) ((MPFR_NOTZERO(x))==0)
-#define MPFR_SET_ZERO(x) (MPFR_MANT(x)[(MPFR_PREC(x)-1)/BITS_PER_MP_LIMB] = 0)
+#define MPFR_NOTZERO(x) (MPFR_MANT(x)[(MPFR_PREC(x)-1)/BITS_PER_MP_LIMB] != (mp_limb_t) 0)
+#define MPFR_IS_ZERO(x) (MPFR_MANT(x)[(MPFR_PREC(x)-1)/BITS_PER_MP_LIMB] == (mp_limb_t) 0)
+#define MPFR_SET_ZERO(x) (MPFR_MANT(x)[(MPFR_PREC(x)-1)/BITS_PER_MP_LIMB] = (mp_limb_t) 0)
/* Memory gestion */