summaryrefslogtreecommitdiff
path: root/div.c
diff options
context:
space:
mode:
authorhanrot <hanrot@280ebfd0-de03-0410-8827-d642c229c3f4>2001-11-16 13:23:43 +0000
committerhanrot <hanrot@280ebfd0-de03-0410-8827-d642c229c3f4>2001-11-16 13:23:43 +0000
commitf5081d8977ebdf2f6a2648b733fc74a6e54cdeb1 (patch)
treed15a85e81f8aa3a1082c3da7303174187f0275c2 /div.c
parent569a16f84e4ec55a207c83bceba2eb68fc5acd6b (diff)
downloadmpfr-f5081d8977ebdf2f6a2648b733fc74a6e54cdeb1.tar.gz
if () remplace par if ( ==0) ou if ( != 0)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1549 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'div.c')
-rw-r--r--div.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/div.c b/div.c
index 98152cc59..d91d8ed95 100644
--- a/div.c
+++ b/div.c
@@ -201,7 +201,7 @@ mpfr_div (mpfr_ptr q, mpfr_srcptr u, mpfr_srcptr v, mp_rnd_t rnd_mode)
because we might have to divide again if rounding is impossible, or
if the result might be exact. We have however to mimic normalization */
- if (qp[qsize]) { sh = -1; }
+ if (qp[qsize] != 0) { sh = -1; }
else { count_leading_zeros(sh, qp[qsize - 1]); }
/*
@@ -325,7 +325,7 @@ mpfr_div (mpfr_ptr q, mpfr_srcptr u, mpfr_srcptr v, mp_rnd_t rnd_mode)
/* Positive correction is at most 1. */
mpn_sub_n(rem, rem2, rem, rsize);
- if (rem[rsize - 1] ||
+ if (rem[rsize - 1] != 0 ||
mpn_cmp(rem + rsize - vsize - 1, vp, vsize) >= 0)
{
rem[rsize - 1] -=
@@ -360,7 +360,7 @@ mpfr_div (mpfr_ptr q, mpfr_srcptr u, mpfr_srcptr v, mp_rnd_t rnd_mode)
affiche_mp(rem, rsize);
#endif
- if (qp[qsize]) { sh = -1; }
+ if (qp[qsize] != 0) { sh = -1; }
else { count_leading_zeros(sh, qp[qsize - 1]); }
err = BITS_PER_MP_LIMB * qsize;
rp = rem;
@@ -375,7 +375,7 @@ mpfr_div (mpfr_ptr q, mpfr_srcptr u, mpfr_srcptr v, mp_rnd_t rnd_mode)
qexp = MPFR_EXP(u) - MPFR_EXP(v);
- if (qp[qsize])
+ if (qp[qsize] != 0)
/* Hack : qp[qsize] is 0, 1 or 2, hence if not 0, = 2^(qp[qsize] - 1). */
{
near = mpn_rshift(qp, qp, qsize, qp[qsize]);
@@ -384,7 +384,7 @@ mpfr_div (mpfr_ptr q, mpfr_srcptr u, mpfr_srcptr v, mp_rnd_t rnd_mode)
else
{
near = 0;
- if (sh) { mpn_lshift(qp, qp, qsize, sh); qexp -= sh; }
+ if (sh != 0) { mpn_lshift(qp, qp, qsize, sh); qexp -= sh; }
}
cc = mpfr_round_raw_generic(qp, qp, err, (sign_quotient == -1 ? 1 : 0),
@@ -414,7 +414,7 @@ mpfr_div (mpfr_ptr q, mpfr_srcptr u, mpfr_srcptr v, mp_rnd_t rnd_mode)
/* If a bit has been shifted out during normalization, hence
the remainder is nonzero. */
- if (!near)
+ if (near == 0)
while (k >= 0) { if (rp[k]) break; k--; }
if (k >= 0) /* Remainder is nonzero. */
@@ -439,7 +439,7 @@ mpfr_div (mpfr_ptr q, mpfr_srcptr u, mpfr_srcptr v, mp_rnd_t rnd_mode)
/* If a bit has been shifted out during normalization, hence
the remainder is nonzero. */
- if (!near)
+ if (near == 0)
while (k >= 0) { if (rp[k]) break; k--; }
if (k >= 0) /* In fact the quotient is larger than expected */