Commit 998ec60d authored by Niels Möller's avatar Niels Möller
Browse files

(main): Avoid using gmp_fprintf, to stay compatible with gmp-3.1.

Rev: nettle/examples/next-prime.c:1.3
parent 95f62944
...@@ -145,9 +145,11 @@ main(int argc, char **argv) ...@@ -145,9 +145,11 @@ main(int argc, char **argv)
mpz_init(d); mpz_init(d);
mpz_sub(d, p, n); mpz_sub(d, p, n);
gmp_fprintf(stderr, "bit size: %lu, diff: %Zd, total time: %.3g s\n", /* Avoid using gmp_fprintf, to stay compatible with gmp-3.1. */
mpz_sizeinbase(p, 2), d, fprintf(stderr, "bit size: %lu, diff: ", (unsigned long) mpz_sizeinbase(p, 2));
(double)(end - start) / CLOCKS_PER_SEC); mpz_out_str(stderr, 10, d);
fprintf(stderr, ", total time: %.3g s\n",
(double)(end - start) / CLOCKS_PER_SEC);
} }
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment