summaryrefslogtreecommitdiff
path: root/mul.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2001-04-05 15:53:49 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2001-04-05 15:53:49 +0000
commitcea530d87ff401861268b9465759d734cc06c96d (patch)
tree5d654137c0321dcb4ab26a97b4a51eb0c86aabdc /mul.c
parent5f8a2cf4e4386ffa4bfb819924b42b5a22b5f824 (diff)
downloadmpfr-cea530d87ff401861268b9465759d734cc06c96d.tar.gz
fixed pb with inexact flag when 'int' and 'mp_limb_t' has different sizes
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1054 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'mul.c')
-rw-r--r--mul.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mul.c b/mul.c
index 30bde0e6b..197c7cd89 100644
--- a/mul.c
+++ b/mul.c
@@ -42,8 +42,8 @@ mpfr_mul (a, b, c, rnd_mode)
mp_rnd_t rnd_mode;
#endif
{
- unsigned int bn, cn, an, tn, k, inexact = 0;
- int cc;
+ unsigned int bn, cn, an, tn, k;
+ int cc, inexact = 0;
mp_limb_t *ap=MPFR_MANT(a), *bp=MPFR_MANT(b), *cp=MPFR_MANT(c), *tmp, b1;
long int sign_product;
mp_prec_t prec_a=MPFR_PREC(a), prec_b=MPFR_PREC(b), prec_c=MPFR_PREC(c);
@@ -135,9 +135,9 @@ mpfr_mul (a, b, c, rnd_mode)
/* 0 <= left_a < BITS_PER_MP_LIMB */
tn -= an;
if (left_a)
- inexact = tmp[tn] & (((mp_limb_t) 1 << left_a) - 1);
+ inexact = (tmp[tn] & (((mp_limb_t) 1 << left_a) - 1)) != (mp_limb_t) 0;
while ((inexact == 0) && tn)
- inexact = tmp[--tn];
+ inexact = tmp[--tn] != (mp_limb_t) 0;
}
TMP_FREE(marker);