From a1cb567d9dc6adb7b08609b0c455c159ff6681a3 Mon Sep 17 00:00:00 2001 From: enge Date: Mon, 12 Sep 2011 12:27:15 +0000 Subject: norm.c: stricter typing in comparison git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@1093 211d60ee-9f03-0410-a15a-8952a2c7a4e4 --- src/norm.c | 6 ++++-- 1 file 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); -- cgit v1.2.1