diff options
author | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2004-12-20 12:54:45 +0000 |
---|---|---|
committer | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2004-12-20 12:54:45 +0000 |
commit | a55c32d9d5887234cc6f71fc7065709321604a83 (patch) | |
tree | a81789ab56f932d0aa69978132e63c907a845c08 /exp.c | |
parent | 74a42ec8f7798f33d87b971eb832b0f39bf58674 (diff) | |
download | mpfr-a55c32d9d5887234cc6f71fc7065709321604a83.tar.gz |
Fix wrong integer type and a test.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3158 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'exp.c')
-rw-r--r-- | exp.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -31,7 +31,9 @@ MA 02111-1307, USA. */ int mpfr_exp (mpfr_ptr y, mpfr_srcptr x, mp_rnd_t rnd_mode) { - int expx, precy, inexact; + mp_exp_t expx; + mp_prec_t precy; + int inexact; double d; MPFR_SAVE_EXPO_DECL (expo); @@ -80,7 +82,7 @@ mpfr_exp (mpfr_ptr y, mpfr_srcptr x, mp_rnd_t rnd_mode) } /* if x < 2^(-precy), then exp(x) i.e. gives 1 +/- 1 ulp(1) */ - if (MPFR_UNLIKELY(expx < -precy)) + if (MPFR_UNLIKELY (expx < 0 && (mpfr_uexp_t) (-expx) > precy)) { int signx = MPFR_SIGN(x); |