summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2011-09-12 12:27:15 +0000
committerenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2011-09-12 12:27:15 +0000
commita1cb567d9dc6adb7b08609b0c455c159ff6681a3 (patch)
tree0dc5b6f8aa53bb4b124fb0048331ceaa36ac68ff
parentb62f0dd739664eb944b0342ef8d3242fc096a608 (diff)
downloadmpc-a1cb567d9dc6adb7b08609b0c455c159ff6681a3.tar.gz
norm.c: stricter typing in comparison
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@1093 211d60ee-9f03-0410-a15a-8952a2c7a4e4
-rw-r--r--src/norm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/norm.c b/src/norm.c
index 9594082..04edc72 100644
--- a/src/norm.c
+++ b/src/norm.c
@@ -114,13 +114,15 @@ mpc_norm (mpfr_ptr a, mpc_srcptr b, mpfr_rnd_t rnd)
scaling in the "else" case work without underflow, we test
whether exp(u) is larger than a small negative number instead.
The second case is handled analogously. */
- if (!mpfr_zero_p (u) && mpfr_get_exp (u) - 2 * prec_u > emin
+ if (!mpfr_zero_p (u)
+ && mpfr_get_exp (u) - 2 * (mpfr_exp_t) prec_u > emin
&& mpfr_get_exp (u) > -10) {
mpfr_set_prec (v, MPFR_PREC_MIN);
mpfr_set_ui_2exp (v, 1, emin - 1, GMP_RNDZ);
inexact = mpfr_add (a, u, v, rnd);
}
- else if (!mpfr_zero_p (v) && mpfr_get_exp (v) - 2 * prec_v > emin
+ else if (!mpfr_zero_p (v)
+ && mpfr_get_exp (v) - 2 * (mpfr_exp_t) prec_v > emin
&& mpfr_get_exp (v) > -10) {
mpfr_set_prec (u, MPFR_PREC_MIN);
mpfr_set_ui_2exp (u, 1, emin - 1, GMP_RNDZ);