diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2002-04-12 16:11:14 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2002-04-12 16:11:14 +0000 |
commit | 73e28ccf0a5af92d0bbde32cc88f399f9eb354fa (patch) | |
tree | 5a7f660b375504868faeb0716d85f49b3cf05245 | |
parent | 52d1db754d00ea55bb694e3683e8f4fa13146bfc (diff) | |
download | mpfr-73e28ccf0a5af92d0bbde32cc88f399f9eb354fa.tar.gz |
Code clean-up.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1865 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r-- | exp.c | 3 | ||||
-rw-r--r-- | exp3.c | 9 | ||||
-rw-r--r-- | exp_2.c | 3 | ||||
-rw-r--r-- | mpfr-impl.h | 3 | ||||
-rw-r--r-- | tests/tconst_log2.c | 3 | ||||
-rw-r--r-- | tests/texp.c | 4 |
6 files changed, 9 insertions, 16 deletions
@@ -28,9 +28,6 @@ MA 02111-1307, USA. */ /* #define DEBUG */ -extern int mpfr_exp_2 _PROTO((mpfr_ptr, mpfr_srcptr, mp_rnd_t)); -extern int mpfr_exp3 _PROTO((mpfr_ptr, mpfr_srcptr, mp_rnd_t)); - /* use Brent's formula exp(x) = (1+r+r^2/2!+r^3/3!+...)^(2^K)*2^n where x = n*log(2)+(2^K)*r number of operations = O(K+prec(r)/K) @@ -1,6 +1,6 @@ /* mpfr_exp -- exponential of a floating-point number -Copyright 1999, 2001 Free Software Foundation, Inc. +Copyright 1999, 2001, 2002 Free Software Foundation, Inc. This file is part of the MPFR Library. @@ -26,7 +26,6 @@ MA 02111-1307, USA. */ #include "mpfr-impl.h" static int mpfr_exp_rational _PROTO ((mpfr_ptr, mpz_srcptr, int, int)); -int mpfr_exp3 _PROTO ((mpfr_ptr, mpfr_srcptr, mp_rnd_t)); static int mpfr_exp_rational (mpfr_ptr y, mpz_srcptr p, int r, int m) @@ -198,9 +197,3 @@ mpfr_exp3 (mpfr_ptr y, mpfr_srcptr x, mp_rnd_t rnd_mode) mpfr_clear(x_copy); return inexact; } - - - - - - @@ -1,7 +1,7 @@ /* mpfr_exp_2 -- exponential of a floating-point number using Brent's algorithms in O(n^(1/2)*M(n)) and O(n^(1/3)*M(n)) -Copyright 1999, 2000, 2001 Free Software Foundation, Inc. +Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of the MPFR Library. @@ -30,7 +30,6 @@ static int mpfr_exp2_aux _PROTO ((mpz_t, mpfr_srcptr, int, int*)); static int mpfr_exp2_aux2 _PROTO ((mpz_t, mpfr_srcptr, int, int*)); static mp_exp_t mpz_normalize _PROTO ((mpz_t, mpz_t, int)); static int mpz_normalize2 _PROTO ((mpz_t, mpz_t, int, int)); -int mpfr_exp_2 _PROTO ((mpfr_ptr, mpfr_srcptr, mp_rnd_t)); /* returns floor(sqrt(n)) */ unsigned long diff --git a/mpfr-impl.h b/mpfr-impl.h index 846f62e40..d1f34a95a 100644 --- a/mpfr-impl.h +++ b/mpfr-impl.h @@ -172,6 +172,7 @@ typedef union ieee_double_extract Ieee_double_extract; extern "C" { #endif +extern mp_prec_t __mpfr_const_log2_prec; int mpfr_set_underflow _PROTO ((mpfr_ptr, mp_rnd_t, int)); int mpfr_set_overflow _PROTO ((mpfr_ptr, mp_rnd_t, int)); void mpfr_save_emin_emax _PROTO ((void)); @@ -192,6 +193,8 @@ long _mpfr_floor_log2 _PROTO ((double)); double _mpfr_ceil_exp2 _PROTO ((double)); unsigned long _mpfr_isqrt _PROTO ((unsigned long)); unsigned long _mpfr_cuberoot _PROTO ((unsigned long)); +int mpfr_exp_2 _PROTO ((mpfr_ptr, mpfr_srcptr, mp_rnd_t)); +int mpfr_exp3 _PROTO ((mpfr_ptr, mpfr_srcptr, mp_rnd_t)); #define mpfr_round_raw(yp, xp, xprec, neg, yprec, r, inexp) \ mpfr_round_raw_generic((yp), (xp), (xprec), (neg), (yprec), (r), (inexp), 0) diff --git a/tests/tconst_log2.c b/tests/tconst_log2.c index f77d5a2f7..dce85c38f 100644 --- a/tests/tconst_log2.c +++ b/tests/tconst_log2.c @@ -22,11 +22,12 @@ MA 02111-1307, USA. */ #include <stdio.h> #include <stdlib.h> #include "gmp.h" +#include "gmp-impl.h" #include "mpfr.h" +#include "mpfr-impl.h" /* tlog2 [prec] [rnd] [0 = no print] */ -extern mp_prec_t __mpfr_const_log2_prec; void check _PROTO ((mp_prec_t, mp_prec_t)); void diff --git a/tests/texp.c b/tests/texp.c index 89fec889c..d7ec68b3d 100644 --- a/tests/texp.c +++ b/tests/texp.c @@ -24,7 +24,9 @@ MA 02111-1307, USA. */ #include <stdlib.h> #include <time.h> #include "gmp.h" +#include "gmp-impl.h" #include "mpfr.h" +#include "mpfr-impl.h" #include "mpfr-test.h" int check3 _PROTO((double, mp_rnd_t, double)); @@ -32,8 +34,6 @@ int check_large _PROTO((double, int, mp_rnd_t)); int check_worst_case _PROTO((double, double)); int check_worst_cases _PROTO((void)); void compare_exp2_exp3 _PROTO((int)); -extern int mpfr_exp_2 _PROTO((mpfr_ptr, mpfr_srcptr, mp_rnd_t)); -extern int mpfr_exp3 _PROTO((mpfr_ptr, mpfr_srcptr, mp_rnd_t)); int maxu=0; |