diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2014-01-29 23:43:47 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2014-01-29 23:43:47 +0000 |
commit | 2da0783d9f5d4124e0efea3de55384408e47937d (patch) | |
tree | d8cb9dddf51685b7026529de671a5d8a4fd6c663 /src/exp.c | |
parent | f027fb01c44b45faac26db2fd79d4920fc7ea254 (diff) | |
download | mpfr-2da0783d9f5d4124e0efea3de55384408e47937d.tar.gz |
[src] Add constants:
* __gmpfr_mone = -1
* mpfr_const_log2_RNDD = log(2) rounded down in precision 64 bits
* mpfr_const_log2_RNDU = log(2) rounded up in precision 64 bits
(modified patch from Patrick PĂ©lissier).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8913 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/exp.c')
-rw-r--r-- | src/exp.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -86,8 +86,9 @@ mpfr_exp (mpfr_ptr y, mpfr_srcptr x, mpfr_rnd_t rnd_mode) inexact = mpfr_set_exp_t (e, expo.saved_emax, MPFR_RNDN); MPFR_ASSERTD (inexact == 0); - mpfr_const_log2 (bound_emax, expo.saved_emax < 0 ? MPFR_RNDD : MPFR_RNDU); - mpfr_mul (bound_emax, bound_emax, e, MPFR_RNDU); + mpfr_mul (bound_emax, expo.saved_emax < 0 ? + __gmpfr_const_log2_RNDD : __gmpfr_const_log2_RNDU, + e, MPFR_RNDU); previous_emax = expo.saved_emax; MPFR_SAVE_EXPO_FREE (expo); } |