[erlang-questions] generating primes

Duane Schaub <>
Mon Nov 24 15:26:11 CET 2008

Given erlang's ability to handle arbitrary math - how much ram would be needed to
calculate a 14million digit prime?  I think that there was mention that each digit is 16
bits, so that would be 28MB per value and you would need to store that plus at least two
other values half that size - of course, I could be totally off base here.

If that is true, this is well within the limits of a PC.... perhaps an erlang grid machine
to find the next prime would be in order.  I think this would be a nice demonstration and
could be made with an adaptation of the eJabber program or the Armstrong chat server demo
from his book.

A client subscribes and is given a "chunk" to process.  The server just tracks chunks and
if no result is returned after a period of time, the chunk is reassigned.


More information about the erlang-questions mailing list