This is a problem for 32 bit machines where long int implementation is
32 bits, like regular pc linux. It will overflow as soon as list_max >
sqrt(2^31 - 1) which is 46340. It seems to go into an infinite loop when
you try list_max = 100000. Ill try it on my 64 bit machine if I get a
chance but the old sieve programs do better than this.
I think one of your programs used 4*x*x+1 which is even worse.
Bernhard Helmes wrote:
> // 1. Polynom
>
> for (x=1; x<List_max; x++)
> {
> list [x]=2*x*x+1;
> }
>
--
VE6LFM Terminal insomniac
_______________________________________________
Prime mailing list
[email protected]
http://hogranch.com/mailman/listinfo/prime