diff options
author | enge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2011-09-12 12:27:15 +0000 |
---|---|---|
committer | enge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2011-09-12 12:27:15 +0000 |
commit | a1cb567d9dc6adb7b08609b0c455c159ff6681a3 (patch) | |
tree | 0dc5b6f8aa53bb4b124fb0048331ceaa36ac68ff /src | |
parent | b62f0dd739664eb944b0342ef8d3242fc096a608 (diff) | |
download | mpc-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
Diffstat (limited to 'src')
-rw-r--r-- | src/norm.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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); |