commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sharon Lourduraj <>
Subject Re: [math] Prime Numbers Library.
Date Sun, 12 Mar 2006 23:59:22 GMT

Thank you for the positive input on implementing Prime Number functions. 
I have created a 'wish' on the Math Wish List page. I would like to lay 
out an initial plan before everyone starts to jump into coding the 

Here is the base "off-my-head" plan, in the order that might prove the 
implementation to be of positive value, also the order of difficulty:

1. Implement naive primality (quick tests, but are slow for large 
numbers) testing algorithms. These algorithms are not very fast and are 
mainly intended for small numbers. Some involve trial and error methods. 
Some involve generating a sieve, as aligned, to test the given number 
and derive result from the contents of the sieve.

2. Implement probabilistic testing (classical tests) algorithms. These 
algorithms include tests that identify a number as a probable-prime, of 
course using logical deduction (Fermat, Miller-Rabin, etc.) theorized by 
mathematicians. These algorithms are relatively fast for large numbers, 
but are sophisticated. They do contain a calculated error margin.

3. Implement General purpose testing algorithms. These algorithms are 
extremely advanced. They are significantly faster than any other 
algorithms. Some of these algorithms have been widely accepted to work, 
but are based  on conjectures that have still not been proved true (but 
are widely assumed to be). These algorithms will significantly test our 
brains and the scope of [math].

Alright, all that thoughts are off my head now. Feel free to make any 
corrections, I do not have much knowledge of advanced algorithms just a 
keen interest. Also, feel free to make suggestions.

I have created a wiki entry :-)

I will updated a full-fledged plan as time allows.


Source 1:
Source 2:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message