![]() |
|
|
#1 |
|
(loop (#_fork))
Feb 2006
Cambridge, England
3×2,141 Posts |
What's the current state of the art in software for listing the primes in medium-sized intervals a reasonable way along the number line (say 10^14-10^9 .. 10^14) on a CPU?
Also, if I've gone to the bother of writing a very fast CUDA routine for listing large primes, are there any interesting number-theoretical things to _do_ with the large primes? I suppose a wise person would have asked this before writing the routine, but never have I called myself a wise person. (would it be interesting to try to write some CUDA code for sieving Sierpinski numbers or similar?) |
|
|
|
|
|
#2 | ||
|
Nov 2003
1D2416 Posts |
Quote:
representation important? (e.g. one can 'list' all the primes in an interval of length 10 using just 4 bits). Finding the primes in such an interval is best done by a simple Sieve or Eratosthenes. Quote:
one's viewpoint. -- Help out in Goldbach computations. There really are not many uses for lists of large primes. |
||
|
|
|
|
|
#3 | |
|
Nov 2003
22×5×373 Posts |
Quote:
useful, but it depends on the size of the primes and the length of the interval. There is a fair amount of pre-computation overhead. |
|
|
|
|
|
|
#4 | |
|
(loop (#_fork))
Feb 2006
Cambridge, England
3·2,141 Posts |
Quote:
The Goldbach testing is up to 1.5e18, which needs about a 64MB array to store the small primes (one byte per difference) ... |
|
|
|
|
|
|
#5 |
|
Aug 2002
Termonfeckin, IE
1010110011002 Posts |
|
|
|
|
|
|
#6 | |
|
Nov 2003
22·5·373 Posts |
Quote:
a sophisticated implementation. I separate the two. BTW, one stores HALF the distance, not the distance itself, since it is always even. |
|
|
|
|
|
|
#7 | |
|
Account Deleted
"Tim Sorbera"
Aug 2006
San Antonio, TX USA
10AB16 Posts |
Quote:
Last fiddled with by Mini-Geek on 2009-10-19 at 18:37 |
|
|
|
|
|
|
#8 |
|
Nov 2003
22×5×373 Posts |
|
|
|
|
|
|
#9 |
|
Aug 2006
3×1,993 Posts |
I suppose once you run out of space you just move to two bytes. That shouldn't be exhausted until > 10^157 if you believe Cramér.
|
|
|
|
![]() |
| Thread Tools | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Digit strings containing primes | davar55 | Puzzles | 13 | 2018-03-15 14:46 |
| What to do with 16 digit twin, non-Mersenne primes? | RienS | Miscellaneous Math | 15 | 2014-11-18 01:48 |
| 911 Digit Primes Quiz | Stargate38 | Puzzles | 4 | 2011-07-14 12:16 |
| Prime-Digit Primes... | petrw1 | Puzzles | 10 | 2009-12-16 21:58 |
| Twin primes in the 50,000 digit range? | Joshua2 | Math | 15 | 2005-06-11 18:46 |