Please give a a reason, why 1 is a composite
Vincent Lefevre
vincent at vinc17.net
Wed Mar 25 19:17:50 UTC 2015
On 2015-03-25 08:45:53 +0100, tg at gmplib.org wrote:
> There are texts (older ones more than modern ones) that define 1 to be
> prime. The common view today is that it is not prime (and certainly not
> a composite).
I agree, but this is not what the GMP 6.0.0 manual says:
-- Function: int mpz_probab_prime_p (const mpz_t N, int REPS)
Determine whether N is prime. Return 2 if N is definitely prime,
return 1 if N is probably prime (without being certain), or return
0 if N is definitely composite.
which implies that a number is either prime or composite. This is wrong!
--
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
More information about the gmp-discuss
mailing list