[Mono-list] More fighting with Hashtable
Brian Jepson
bjepson@oreilly.com
Fri, 13 Jul 2001 11:35:49 -0400 (EDT)
On Thu, 12 Jul 2001, John Barnette wrote:
[...]
> Can anybody point me at some math for determining the next prime
> number greater than a given integer?
>
There's a file in the gmp source distribution, gmp-3.1.mpz/nextprime.c,
that seems to do this. You can get the distribution from
ftp://ftp.gnu.org/gnu/gmp
However, it may not be fully debugged:
#if 0
/* This code is not yet tested. Will be enabled in 3.1. */
Also, all the gmp arithmetic is bignum, so you'll see lots of function
calls instead of arithmetic operators.
You may also find some resources at the Prime Pages:
http://www.utm.edu/research/primes/
In particular, this page:
http://www.utm.edu/research/primes/prove/index.html
- Brian