Subj : Re: Faster algorithm for prim numbers..!! To : comp.programming From : Mabden Date : Tue Sep 27 2005 03:04 pm "Steve O'Hara-Smith" wrote in message news:20050922075541.4c108976.steveo@eircom.net... > On 21 Sep 2005 18:49:30 -0700 > websnarf@gmail.com wrote: > > > Steve O'Hara-Smith wrote: > > > "Robert Bralic" wrote: > > > > I weated a simple program, he is compiled > > > > with gcc, and generates prim numbers, > > > > with fastes method that I find.He is based > > > > on divide with generated prim numbers... > > > > At end he gives time report on format: > > > > dd:hh:mi:sec... > > > > Precompile as gcc prim.c -o prim, and use > > > > him as "prim upper_bound",as example: > > > > "prim 1000".If anybody have some idea > > > > how to make algorithm fastes write to me...!! > > > > > > http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes > > > and > > > http://en.wikipedia.org/wiki/Sieve_of_Atkin > > > > That's fine if you want that set of primes between 1 and x. But if you > > Which appears to be what the OP was after. I thought he wanted Prim numbers... -- Mabden .