diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2016-12-20 12:57:31 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2016-12-20 12:57:31 +0000 |
commit | 0cafea35711f386c00c8b443ced4371e314b2cec (patch) | |
tree | 9809cd0f93602e23619a2c77ca705d6f7cf365ab /src/sum.c | |
parent | 0ef3923b1bf843cfc7f3849c7c45c9b144aaa7a2 (diff) | |
download | mpfr-0cafea35711f386c00c8b443ced4371e314b2cec.tar.gz |
[src/sum.c] Delay some assignments so that they are done just before
the variables are used (this should have been done in r10467).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11075 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/sum.c')
-rw-r--r-- | src/sum.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -642,12 +642,6 @@ sum_aux (mpfr_ptr sum, mpfr_ptr *const x, unsigned long n, mpfr_rnd_t rnd, (mpfr_eexp_t) maxexp, maxexp == MPFR_EXP_MIN ? " (MPFR_EXP_MIN)" : "")); - sn = MPFR_PREC2LIMBS (sq); - sd = (mpfr_prec_t) sn * GMP_NUMB_BITS - sq; - sh = cancel % GMP_NUMB_BITS; - - MPFR_ASSERTD (sd >= 0 && sd < GMP_NUMB_BITS); - if (MPFR_LIKELY (u > minexp)) { mpfr_prec_t tq; @@ -1026,6 +1020,12 @@ sum_aux (mpfr_ptr sum, mpfr_ptr *const x, unsigned long n, mpfr_rnd_t rnd, u < minexp). The trailing bits of the destination may contain garbage at this point. */ + sn = MPFR_PREC2LIMBS (sq); + sd = (mpfr_prec_t) sn * GMP_NUMB_BITS - sq; + sh = cancel % GMP_NUMB_BITS; + + MPFR_ASSERTD (sd >= 0 && sd < GMP_NUMB_BITS); + if (MPFR_LIKELY (u > minexp)) { mp_size_t wi; |