Please give a a reason, why 1 is a composite
tg at gmplib.org
tg at gmplib.org
Wed Mar 25 19:20:26 UTC 2015
Vincent Lefevre <vincent at vinc17.net> writes:
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!
Will do 's;composite;non-prime;'.
--
Torbjörn
Please encrypt, key id 0xC8601622
More information about the gmp-discuss
mailing list