diff options
author | Niels Möller <nisse@lysator.liu.se> | 2011-10-03 10:10:19 +0200 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2011-10-03 10:10:19 +0200 |
commit | 664fb43a65d895196a57e1140b467aa7985e19ed (patch) | |
tree | d609b875642c908715b0a1b400add157bdbc9890 /tune/tune-gcd-p.c | |
parent | 03e0455b49fbf5b1047f63bb433167f5efa45e15 (diff) | |
download | gmp-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.c | 4 |
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; |