[racket] Math library ready for testing

From: Pierpaolo Bernardi (olopierpa at gmail.com)
Date: Wed Dec 12 06:02:44 EST 2012

BTW, I seem to remember that GMP stores the table of small primes as a
vector of the differences between consecutive primes. Storing a byte
per prime goes a long way.

Let's see... there are 50847534 primes under 10^9, the max difference
between a consecutive pair of them is 282. We can store that value /2,
so the max number we need to store is 141, which fits in a byte.

So this table would need 48MB in this representation, and (/ (expt 10
9) 8) ==> 119M bytes as a bit-vector.

Just another possibility...

Cheers
P.

Posted on the users mailing list.