summaryrefslogtreecommitdiff
path: root/exp_2.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2002-04-07 00:38:47 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2002-04-07 00:38:47 +0000
commit9bf7d0a9a20f36a151c75442f5d40e29b1f8f959 (patch)
tree8ef85d212aed286d03a33cecb0f35e5d1d57497b /exp_2.c
parent2c1213f578f342a6dd42d797ad292cb8da9154d0 (diff)
downloadmpfr-9bf7d0a9a20f36a151c75442f5d40e29b1f8f959.tar.gz
mpfr_get_d -> mpfr_get_d1 and mpfr_get_d2 -> mpfr_get_d.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1825 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'exp_2.c')
-rw-r--r--exp_2.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/exp_2.c b/exp_2.c
index 63c471763..1e66642e9 100644
--- a/exp_2.c
+++ b/exp_2.c
@@ -114,7 +114,7 @@ mpfr_exp_2 (mpfr_ptr y, mpfr_srcptr x, mp_rnd_t rnd_mode)
precy = MPFR_PREC(y);
- n = (int) (mpfr_get_d(x) / LOG2);
+ n = (int) (mpfr_get_d1 (x) / LOG2);
/* for the O(n^(1/2)*M(n)) method, the Taylor series computation of
n/K terms costs about n/(2K) multiplications when computed in fixed
@@ -146,9 +146,9 @@ mpfr_exp_2 (mpfr_ptr y, mpfr_srcptr x, mp_rnd_t rnd_mode)
/* r = floor(n*log(2)) */
#ifdef DEBUG
- printf("x=%1.20e\n",mpfr_get_d(x));
+ printf("x=%1.20e\n", mpfr_get_d1 (x));
printf(" ="); mpfr_print_binary(x); putchar('\n');
- printf("r=%1.20e\n",mpfr_get_d(r));
+ printf("r=%1.20e\n", mpfr_get_d1 (r));
printf(" ="); mpfr_print_binary(r); putchar('\n');
#endif
mpfr_sub(r, x, r, GMP_RNDU);
@@ -159,7 +159,7 @@ mpfr_exp_2 (mpfr_ptr y, mpfr_srcptr x, mp_rnd_t rnd_mode)
mpfr_sub(r, x, r, GMP_RNDU);
}
#ifdef DEBUG
- printf("x-r=%1.20e\n",mpfr_get_d(r));
+ printf("x-r=%1.20e\n", mpfr_get_d1 (r));
printf(" ="); mpfr_print_binary(r); putchar('\n');
if (MPFR_SIGN(r)<0) { fprintf(stderr,"Error in mpfr_exp: r<0\n"); exit(1); }
#endif
@@ -194,7 +194,8 @@ mpfr_exp_2 (mpfr_ptr y, mpfr_srcptr x, mp_rnd_t rnd_mode)
K += k;
#ifdef DEBUG
printf("after mult. by 2^n:\n");
- if (MPFR_EXP(s)>-1024) printf("s=%1.20e\n",mpfr_get_d(s));
+ if (MPFR_EXP(s) > -1024)
+ printf("s=%1.20e\n", mpfr_get_d1 (s));
printf(" ="); mpfr_print_binary(s); putchar('\n');
printf("err=%d bits\n", K);
#endif