diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2007-12-18 11:24:53 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2007-12-18 11:24:53 +0000 |
commit | c9093ec60a33ebcfa8cc010714d33331653eecff (patch) | |
tree | 18239ef27464a484ac10273d833ca9ed295e84ae | |
parent | 4b8f87e041c789153a112a647dc0a4d9e5e44988 (diff) | |
download | mpfr-c9093ec60a33ebcfa8cc010714d33331653eecff.tar.gz |
pow_ui.c: fixed an assertion.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@5107 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r-- | pow_ui.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -103,11 +103,11 @@ mpfr_pow_ui (mpfr_ptr x, mpfr_srcptr y, unsigned long int n, mp_rnd_t rnd) /* now 2^(i-1) <= n < 2^i */ MPFR_ASSERTD (prec > (mpfr_prec_t) i); err = prec - 1 - (mpfr_prec_t) i; - MPFR_ASSERTD (i >= 1); mpfr_clear_overflow (); mpfr_clear_underflow (); /* First step: compute square from y */ inexact = mpfr_mul (res, y, y, GMP_RNDU); + MPFR_ASSERTD (i >= 2); if (n & (1UL << (i-2))) inexact |= mpfr_mul (res, res, y, rnd1); for (i -= 3; i >= 0 && !mpfr_overflow_p () && !mpfr_underflow_p (); i--) |