diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2002-12-16 00:56:03 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2002-12-16 00:56:03 +0000 |
commit | 2c732d0395f02c6e415aadeb963ab8d9c24a2efa (patch) | |
tree | 6696693e53b4db27051f0007e2e4f105a298d0ec /exp_2.c | |
parent | 94680bf0c2219d8eab5c939ab565528d50dbae73 (diff) | |
download | mpfr-2c732d0395f02c6e415aadeb963ab8d9c24a2efa.tar.gz |
Suppress some #define and fix symbol names (makes code cleaner):
perl -pi -e 's/__mpfr_flags/__gmpfr_flags/g' **/*.{c,h}
perl -pi -e 's/__mpfr_emin/__gmpfr_emin/g' **/*.{c,h}
perl -pi -e 's/__mpfr_emax/__gmpfr_emax/g' **/*.{c,h}
perl -pi -e 's/__mpfr_default_fp_bit_precision/__gmpfr_default_fp_bit_precision/g' **/*.{c,h}
perl -pi -e 's/__gmp_default_rounding_mode/__gmpfr_default_rounding_mode/g' **/*.{c,h}
perl -pi -e 's/__mpfr_const_log2_prec/__gmpfr_const_log2_prec/g' **/*.{c,h}
perl -pi -e 's/__mpfr_const_pi_prec/__gmpfr_const_pi_prec/g' **/*.{c,h}
perl -pi -e 's/_mpfr_ceil_log2/__gmpfr_ceil_log2/g' **/*.{c,h}
perl -pi -e 's/_mpfr_floor_log2/__gmpfr_floor_log2/g' **/*.{c,h}
perl -pi -e 's/_mpfr_ceil_exp2/__gmpfr_ceil_exp2/g' **/*.{c,h}
perl -pi -e 's/_mpfr_isqrt/__gmpfr_isqrt/g' **/*.{c,h}
perl -pi -e 's/_mpfr_cuberoot/__gmpfr_cuberoot/g' **/*.{c,h}
perl -pi -e 's/^#define __gmpfr_.*\n//' *.h
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2125 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'exp_2.c')
-rw-r--r-- | exp_2.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -33,7 +33,7 @@ static int mpz_normalize2 _PROTO ((mpz_t, mpz_t, int, int)); /* returns floor(sqrt(n)) */ unsigned long -_mpfr_isqrt (unsigned long n) +__gmpfr_isqrt (unsigned long n) { unsigned long s; @@ -46,7 +46,7 @@ _mpfr_isqrt (unsigned long n) /* returns floor(n^(1/3)) */ unsigned long -_mpfr_cuberoot (unsigned long n) +__gmpfr_cuberoot (unsigned long n) { double s, is; @@ -118,9 +118,9 @@ mpfr_exp_2 (mpfr_ptr y, mpfr_srcptr x, mp_rnd_t rnd_mode) /* for the O(n^(1/2)*M(n)) method, the Taylor series computation of n/K terms costs about n/(2K) multiplications when computed in fixed point */ - K = (precy<SWITCH) ? _mpfr_isqrt((precy + 1) / 2) : _mpfr_cuberoot (4*precy); + K = (precy<SWITCH) ? __gmpfr_isqrt((precy + 1) / 2) : __gmpfr_cuberoot (4*precy); l = (precy-1)/K + 1; - err = K + (int) _mpfr_ceil_log2 (2.0 * (double) l + 18.0); + err = K + (int) __gmpfr_ceil_log2 (2.0 * (double) l + 18.0); /* add K extra bits, i.e. failure probability <= 1/2^K = O(1/precy) */ q = precy + err + K + 3; mpfr_init2 (r, q); @@ -284,7 +284,7 @@ mpfr_exp2_aux2 (mpz_t s, mpfr_srcptr r, int q, int *exps) /* estimate value of l */ l = q / (-MPFR_EXP(r)); - m = (int) _mpfr_isqrt (l); + m = (int) __gmpfr_isqrt (l); /* we access R[2], thus we need m >= 2 */ if (m < 2) m = 2; TMP_MARK(marker); |