Please give a a reason, why 1 is a composite
Hans Aberg
haberg-1 at telia.com
Wed Mar 25 19:54:05 UTC 2015
> On 25 Mar 2015, at 20:20, tg at gmplib.org wrote:
>
> 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!
There are mutually exclusive sets: zero-divisors (0 in an integral domain), units, composites, and primes.
More information about the gmp-discuss
mailing list