Bill Allombert on Fri, 6 Dec 2002 19:03:02 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: primetables SEGV |
On Fri, Dec 06, 2002 at 06:50:50PM +0100, Karim BELABAS wrote: > On the other hand, I do not see any application for huge precomputed prime > lists. So it might be a much better idea to disable huge maxnum values, and > extend forprime() and friends to use the initprimes() mechanism to quickly > generated online prime numbers (up to primelimit^2). I agree. For example for primelimit=10^6, we could have a function that quickly build the table of primes between k*10^6 and (k+1)^10^6 for k<10^6. This would be more efficient that storing the whole table. It is usually better to extant the table than just failing with an error. Also we have seldom use of *all* primes less than 10^10 say, because there too many of them. But sometime we needs prime between 10^10 and 10^10+10^6. Cheers, Bill PS: I have finished committing my patches.