diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2000-06-16 08:21:53 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2000-06-16 08:21:53 +0000 |
commit | 0e7a6fc95fca512270355f2950b6bc5e28366c7e (patch) | |
tree | 5adf1138891964eaa679515490607145df8002fb /log.c | |
parent | 41d28f8350073f96d1092f33586b4b33caecdaa9 (diff) | |
download | mpfr-0e7a6fc95fca512270355f2950b6bc5e28366c7e.tar.gz |
improved choice of initial precision
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@621 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'log.c')
-rw-r--r-- | log.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -78,7 +78,9 @@ mpfr_log() if (ref<0) ref=-ref; - p=q+4; + /* use initial precision about q+lg(q)+5 */ + p=q+5; m=q; while (m) { p++; m >>= 1; } + /* adjust to entire limb */ if (p%BITS_PER_MP_LIMB) p += BITS_PER_MP_LIMB - (p%BITS_PER_MP_LIMB); |