summaryrefslogtreecommitdiff
path: root/src/eint.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2014-01-29 23:43:47 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2014-01-29 23:43:47 +0000
commit2da0783d9f5d4124e0efea3de55384408e47937d (patch)
treed8cb9dddf51685b7026529de671a5d8a4fd6c663 /src/eint.c
parentf027fb01c44b45faac26db2fd79d4920fc7ea254 (diff)
downloadmpfr-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/eint.c')
-rw-r--r--src/eint.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/eint.c b/src/eint.c
index 9ee948e75..6da7af331 100644
--- a/src/eint.c
+++ b/src/eint.c
@@ -244,8 +244,7 @@ mpfr_eint (mpfr_ptr y, mpfr_srcptr x, mpfr_rnd_t rnd)
mpfr_init2 (ump, 64);
mpfr_log (tmp, x, MPFR_RNDU);
mpfr_sub (ump, x, tmp, MPFR_RNDD);
- mpfr_const_log2 (tmp, MPFR_RNDU);
- mpfr_div (ump, ump, tmp, MPFR_RNDD);
+ mpfr_div (ump, ump, __gmpfr_const_log2_RNDU, MPFR_RNDD);
/* FIXME: We really need mpfr_set_exp_t and mpfr_cmpfr_exp_t functions. */
MPFR_ASSERTN (MPFR_EMAX_MAX <= LONG_MAX);
if (mpfr_cmp_ui (ump, __gmpfr_emax) >= 0)