summaryrefslogtreecommitdiff
path: root/log2.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2000-12-01 16:25:53 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2000-12-01 16:25:53 +0000
commit2e31bf9622d8c9c587c5769ebbd3bcf114097498 (patch)
treea94f9800429e3f8944e7339b7d4ec6b1259c5dbc /log2.c
parent3171d816e5803bfbac0d7cbdd5aedb6cd47760f3 (diff)
downloadmpfr-2e31bf9622d8c9c587c5769ebbd3bcf114097498.tar.gz
replaced log(2.0) by LOG2 [first step in getting rid of math.h]
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@822 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'log2.c')
-rw-r--r--log2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/log2.c b/log2.c
index 4edd399c3..f4670d99e 100644
--- a/log2.c
+++ b/log2.c
@@ -69,12 +69,12 @@ mpfr_const_aux_log2(mylog, rnd_mode) mpfr_ptr mylog; mp_rnd_t rnd_mode;
mpz_init(cst);
logn = (int) ceil(log
((double) MPFR_PREC(mylog))
- /log(2.0));
+ /LOG2);
prec_x = prec_i_want + logn;
while (!good){
prec = (int) ceil(log
((double) (prec_x))
- /log(2.0));
+ /LOG2);
mpfr_init2(tmp1, prec_x);
mpfr_init2(result, prec_x);
mpfr_init2(tmp2, prec_x);
@@ -150,7 +150,7 @@ mpfr_const_log2(x, rnd_mode) mpfr_ptr x; mp_rnd_t rnd_mode;
N=2;
do {
oldN = N;
- N = precx + (int)ceil(log((double)N)/log(2.0));
+ N = precx + (int)ceil(log((double)N)/LOG2);
} while (N != oldN);
mpz_init_set_ui(s,0);
mpz_init(u);