summaryrefslogtreecommitdiff
path: root/exp.c
diff options
context:
space:
mode:
authorpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2004-05-04 09:05:30 +0000
committerpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2004-05-04 09:05:30 +0000
commit97fd2f9930494b78a8138a274531b3384b0c1e85 (patch)
treee0f7fe3d05a59e8f929a40f88629c1cd6f02a1de /exp.c
parent49cd4d2ada9392701b80437fd7a764e88e9bb8f7 (diff)
downloadmpfr-97fd2f9930494b78a8138a274531b3384b0c1e85.tar.gz
Add some UNLIKELY to the tests.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2888 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'exp.c')
-rw-r--r--exp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/exp.c b/exp.c
index feddeb7fe..f4f323ccd 100644
--- a/exp.c
+++ b/exp.c
@@ -64,12 +64,12 @@ mpfr_exp (mpfr_ptr y, mpfr_srcptr x, mp_rnd_t rnd_mode)
/* result is +Inf when exp(x) >= 2^(__gmpfr_emax), i.e.
x >= __gmpfr_emax * log(2) */
d = mpfr_get_d1 (x);
- if (d >= (double) __gmpfr_emax * LOG2)
+ if (MPFR_UNLIKELY(d >= (double) __gmpfr_emax * LOG2))
return mpfr_set_overflow (y, rnd_mode, 1);
/* result is 0 when exp(x) < 1/2*2^(__gmpfr_emin), i.e.
x < (__gmpfr_emin-1) * LOG2 */
- if (d < ((double) __gmpfr_emin - 1.0) * LOG2)
+ if (MPFR_UNLIKELY(d < ((double) __gmpfr_emin - 1.0) * LOG2))
{
/* warning: mpfr_set_underflow rounds away for RNDN */
if (rnd_mode == GMP_RNDN && d < ((double) __gmpfr_emin - 2.0) * LOG2)
@@ -78,7 +78,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 (expx < -precy)
+ if (MPFR_UNLIKELY(expx < -precy))
{
int signx = MPFR_SIGN(x);