/* Classify numbers as probable primes, primes or composites. With -q return true if the following argument is a (probable) prime.
Copyright 1999, 2000, 2002, 2005, 2012 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see https://www.gnu.org/licenses/. */
for (i = 1; i < argc; i++)
{ intclass; if (mpz_set_str (n, argv[i], 0) != 0)
print_usage_and_exit (); class = mpz_probab_prime_p (n, 25);
mpz_out_str (stdout, 10, n); if (class == 0)
puts (" is composite"); elseif (class == 1)
puts (" is a probable prime"); else/* class == 2 */
puts (" is a prime");
} exit (0);
}
Messung V0.5
¤ Dauer der Verarbeitung: 0.18 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.