diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2000-12-12 16:38:47 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2000-12-12 16:38:47 +0000 |
commit | a496d7ef76b3001cca1ced0270ea60394f1644f5 (patch) | |
tree | 4ccef1683f123a5cf392e2cec0516cabbb241b87 /exp2.c | |
parent | d1a1c6c7f0309dc4c33f3bda7e1a1ed2f1bc8fdf (diff) | |
download | mpfr-a496d7ef76b3001cca1ced0270ea60394f1644f5.tar.gz |
we need m >= 2 in mpfr_exp2_aux2
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@848 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'exp2.c')
-rw-r--r-- | exp2.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -319,6 +319,8 @@ mpfr_exp2_aux2(s, r, q, exps) /* estimate value of l */ l = q / (-MPFR_EXP(r)); m = (int) sqrt((double) l); + /* we access R[2], thus we need m >= 2 */ + if (m < 2) m = 2; TMP_MARK(marker); R = (mpz_t*) TMP_ALLOC((m+1)*sizeof(mpz_t)); /* R[i] stands for r^i */ expR = (int*) TMP_ALLOC((m+1)*sizeof(int)); /* exponent for R[i] */ |