summaryrefslogtreecommitdiff
path: root/exp2.c
diff options
context:
space:
mode:
authordaney <daney@280ebfd0-de03-0410-8827-d642c229c3f4>2001-11-16 12:25:25 +0000
committerdaney <daney@280ebfd0-de03-0410-8827-d642c229c3f4>2001-11-16 12:25:25 +0000
commit5549497318c9a1930c67debf96d5b84446da6923 (patch)
tree26f151c186e25ddf385ab419395362cf7a56f2a9 /exp2.c
parent088e5ec1b3bba2b70c7a01a80842d1eb66b9fa74 (diff)
downloadmpfr-5549497318c9a1930c67debf96d5b84446da6923.tar.gz
remove the proto, remove math.h
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1532 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'exp2.c')
-rw-r--r--exp2.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/exp2.c b/exp2.c
index 4cabedda4..b3f02c147 100644
--- a/exp2.c
+++ b/exp2.c
@@ -19,8 +19,6 @@ along with the MPFR Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
-#include <stdio.h>
-#include <math.h>
#include "gmp.h"
#include "gmp-impl.h"
#include "mpfr.h"
@@ -30,7 +28,6 @@ MA 02111-1307, USA. */
y=exp(z*log(2))=2^z
*/
-int mpfr_exp2 _PROTO((mpfr_ptr, mpfr_srcptr, mp_rnd_t));
int
#if __STDC__
@@ -111,8 +108,8 @@ mpfr_exp2 (y, x, rnd_mode)
mpfr_mul(te,x,t,GMP_RNDU); /* x*ln(2) */
mpfr_exp(t,te,GMP_RNDN); /* exp(x*ln(2))*/
- /* estimation of the error -- see pow function in algorithms.ps*/
- err=Nt-_mpfr_ceil_log2(1+pow(2,MPFR_EXP(te)+1));
+ /* estimate of the error -- see pow function in algorithms.ps*/
+ err=Nt-(MPFR_EXP(te)+2);
/* actualisation of the precision */
Nt += 10;