diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2000-12-01 16:25:53 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2000-12-01 16:25:53 +0000 |
commit | 2e31bf9622d8c9c587c5769ebbd3bcf114097498 (patch) | |
tree | a94f9800429e3f8944e7339b7d4ec6b1259c5dbc /agm.c | |
parent | 3171d816e5803bfbac0d7cbdd5aedb6cd47760f3 (diff) | |
download | mpfr-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 'agm.c')
-rw-r--r-- | agm.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -25,13 +25,9 @@ MA 02111-1307, USA. */ #include "gmp-impl.h" #include "mpfr.h" - /*Memory gestion */ #define MON_INIT(xp, x, p, s) xp = (mp_ptr) TMP_ALLOC(s*BYTES_PER_MP_LIMB); x -> _mp_prec = p; x -> _mp_d = xp; x -> _mp_size = s; x -> _mp_exp = 0; - - - void #ifdef __STDC__ mpfr_agm(mpfr_ptr r, mpfr_srcptr op2, mpfr_srcptr op1, mp_rnd_t rnd_mode) @@ -111,10 +107,10 @@ mpfr_agm(r, a, b, rnd_mode) eq=0; - err=ceil((3.0/2.0*log((double)p)/log(2.0)+1.0)*exp(-(double)p*log(2.0))+3.0*exp(-2.0*(double)p*uo*log(2.0)/(vo-uo))); + err=ceil((3.0/2.0*log((double)p)/LOG2+1.0)*exp(-(double)p*LOG2)+3.0*exp(-2.0*(double)p*uo*LOG2/(vo-uo))); if(p-err-3<=q) { p=q+err+4; - err=ceil((3.0/2.0*log((double)p)/log(2.0)+1.0)*exp(-(double)p*log(2.0))+3.0*exp(-2.0*(double)p*uo*log(2.0)/(vo-uo))); + err=ceil((3.0/2.0*log((double)p)/LOG2+1.0)*exp(-(double)p*LOG2)+3.0*exp(-2.0*(double)p*uo*LOG2/(vo-uo))); } /* Calculus of un and vn */ |