diff options
author | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2005-03-09 14:23:19 +0000 |
---|---|---|
committer | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2005-03-09 14:23:19 +0000 |
commit | 81c7b2872f78f8d53f44499facf743a99638646f (patch) | |
tree | 491dacce7d0111b23542366f64e6ee50bcc69012 /tuneup.c | |
parent | 04aced373521cdeed63e995476c9a94ec93d20ce (diff) | |
download | mpfr-81c7b2872f78f8d53f44499facf743a99638646f.tar.gz |
Fix bug: compute Mulder Threshold from n/2+1 instead of (n+1)/2
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3380 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tuneup.c')
-rw-r--r-- | tuneup.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -358,7 +358,7 @@ tune_mulder_upto (mp_size_t n) kbest = 0, tbest = t; /* Check Mulder */ - for (k = (n+1)/2 ; k < n ; k++) { + for (k = n/2+1 ; k < n ; k++) { mulhigh_ktab[n] = k; t = speed_measure (speed_mpfr_mulhigh, &s); if (t * TOLERANCE < tbest) @@ -466,6 +466,7 @@ all (const char *filename) printf ("Tuning mpfr_exp_2...\n"); tune_simple_func (&mpfr_exp_2_threshold, speed_mpfr_exp_2, MPFR_PREC_MIN); + mpfr_exp_2_threshold = MAX (BITS_PER_MP_LIMB, mpfr_exp_2_threshold); fprintf (f, "#define MPFR_EXP_2_THRESHOLD %lu\n", (unsigned long) mpfr_exp_2_threshold); @@ -499,7 +500,7 @@ int main (int argc, char *argv[]) verbose = argc > 1; if (verbose) - printf ("Tuning MPFR. It may take some times.\n"); + printf ("Tuning MPFR (Coffee time?)...\n"); all ("mparam.h"); |