summaryrefslogtreecommitdiff
path: root/tune/tune-gcd-p.c
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2011-10-03 10:10:19 +0200
committerNiels Möller <nisse@lysator.liu.se>2011-10-03 10:10:19 +0200
commit664fb43a65d895196a57e1140b467aa7985e19ed (patch)
treed609b875642c908715b0a1b400add157bdbc9890 /tune/tune-gcd-p.c
parent03e0455b49fbf5b1047f63bb433167f5efa45e15 (diff)
downloadgmp-664fb43a65d895196a57e1140b467aa7985e19ed.tar.gz
tune/tune-gcd-p.c (main): Fixed broken loop conditions.
Diffstat (limited to 'tune/tune-gcd-p.c')
-rw-r--r--tune/tune-gcd-p.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tune/tune-gcd-p.c b/tune/tune-gcd-p.c
index c71949afb..3c3815bd2 100644
--- a/tune/tune-gcd-p.c
+++ b/tune/tune-gcd-p.c
@@ -172,7 +172,7 @@ main(int argc, char **argv)
memset (p_table, 0, sizeof(p_table));
- for (n = 100; n++; n < P_TABLE_SIZE)
+ for (n = 100; n < P_TABLE_SIZE; n++)
{
mp_size_t p;
mp_size_t best_p;
@@ -189,7 +189,7 @@ main(int argc, char **argv)
lehmer_time = bench_gcd (&data, 0);
- best_p = search (&best_time, bench_gcd, &data, 10, n-10);
+ best_p = search (&best_time, bench_gcd, &data, n/5, 4*n/5);
if (best_time > lehmer_time)
best_p = 0;