On Wed, 21 February 2001, Chris Caldwell wrote:
> At 12:28 PM 2/20/01 +0100, Ferenc Adorjan wrote:
> >told, i.e. there are three different (though similar) algorithms in the
> >program, which are incorporated in the functions doit4, doit6 and
> >doit12, respectively, and there are several constant tables, which
> >are referred in the algorithms, but to figure out the math behind it
> >seems rather complicated. I will try to spare some time for
> >that. Very probably he is using something more complicated sieve,
> >than I gave.
> >Does anybody know a WEB accesible source where the Atkins
> >theorem is given precisely?
> Try the paper by Atkin's and Bernstein at
Before you invest too much time looking at the original code, can I suggest you download my version of the primegen sieve which as asymptotically 45-50% faster than Bernstein's. It can be found as part of my "prmsieve" contribution to the OpenPFGW project I think www.primeform.net should take you there.
IIRC, I only really made one optimisation, so there are probably plenty of others that could be made. (You'll see I began a second one, but aborted that (only in doit4(), not the other doits after it only provided an asymptotic ~2% speed increase).
Mathematics should not have to involve martyrdom;
Support Eric Weisstein, see http://mathworld.wolfram.com
Find the best deals on the web at AltaVista Shopping!