mpz_nextprime documentation

Paul Leyland paul at
Wed Feb 2 17:23:34 CET 2005

On Wed, 2005-02-02 at 16:10, keith.briggs at wrote:
> > Set rop to the next prime greater than op. 
> >This function uses a probabilistic algorithm to identify primes. For practical purposes it's adequate, the chance of a composite passing will be extremely small. 
> It would be nice if it told us if there's any chance of it missing a prime!

Not sure whether that's a rhetorical question or not.   There is (or
should be if the implementation is correct!) no chance of a prime being
missed.  You get all the primes and a very very very few composites.

I agree there is a deficiency in the documentation.


More information about the gmp-discuss mailing list