Subj : Re: Faster algorithm for prim numbers..!! To : comp.programming From : Steve O'Hara-Smith Date : Thu Sep 22 2005 08:55 am 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. -- C:>WIN | Directable Mirror Arrays The computer obeys and wins. | A better way to focus the sun You lose and Bill collects. | licences available see | http://www.sohara.org/ .