summaryrefslogtreecommitdiff
path: root/exp.c
diff options
context:
space:
mode:
authorpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2004-12-20 12:54:45 +0000
committerpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2004-12-20 12:54:45 +0000
commita55c32d9d5887234cc6f71fc7065709321604a83 (patch)
treea81789ab56f932d0aa69978132e63c907a845c08 /exp.c
parent74a42ec8f7798f33d87b971eb832b0f39bf58674 (diff)
downloadmpfr-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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/exp.c b/exp.c
index 73e4f4c68..a77ff3e31 100644
--- a/exp.c
+++ b/exp.c
@@ -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);