[Mono-list] More fighting with Hashtable

Thomas F. Burdick tfb@OCF.Berkeley.EDU
Fri, 13 Jul 2001 12:31:51 -0700

Brian Jepson writes:
 > 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

Hmm, keeping an array of the primes less than 2^32 would be pretty
easy.  Maybe a back-up prime number generator wouldn't be bad as a
backup for the pathological case where a hash table has more than 2^32
buckets, but it seems a waste to do that computation for anything but
the pathological cases.