- **Computer Science & Computational Number Theory**
(*https://www.mersenneforum.org/forumdisplay.php?f=116*)

- - **Wilson-prime search practicalities**
(*https://www.mersenneforum.org/showthread.php?t=16028*)

[QUOTE=Jeff Gilchrist;271097]Also, I'm wondering if I found another bug. One of my runs is producing a huge amount of results in wilson.txt but they don't seem of actual value.
I'm getting about 3.6MB so far with a ton of lines like: [CODE]70039080617 -1+0p 70039083185 -1+0p 70039087061 -1+0p 70039088333 -1+0p 70039089617 -1+0p 70039091345 -1+0p 70039091669 -1+0p 70039092905 -1+0p 70039093649 -1+0p 70039094777 -1+0p [/CODE] Using the work file: [CODE]st=70000000000-en=71000000000 S[0]=70000000003 S[1]=70000000001 S[2]=70000000007 interval=50000256 printtofile=0 [/CODE][/QUOTE] What I don't know understand, that all of those numbers are composites, some of them are divisible by 5, so surely they are composites by mpz_probab_prime_p function also. Have you got about 5 GB Ram on that machine? (interval=5e7 requires appprox. that amount for large primes). When I put a code, that means it survived thousands of different runs for different st,en,interval inputs for en<10^5, and passed a large test, where en~1e10, just to check there is no int/long long int problem in the code. |

[QUOTE=R. Gerbicz;271103]What I don't know understand, that all of those numbers are composites, some of them are divisible by 5, so surely they are composites by mpz_probab_prime_p function also. Have you got about 5 GB Ram on that machine? (5e7 requires appprox. that amount).
When I put a code, that means it survived thousands of different runs for different st,en,interval inputs for en<10^5, and passed a large test, where en~1e10, just to check there is no int/long long int problem in the code.[/QUOTE] Note that the interval is 50000256 which is not divisible by BR=128 so could that be screwing things up? I have 8GB of RAM on that machine, but I never saw it use more than 1.4GB of RAM though. I'm now re-trying the range with the wilsontest2 code using MPIR. There also might have been a bad GMP5 library or something since my old mingw64 environment was misbehaving. Jeff. |

[QUOTE=Jeff Gilchrist;271106]Note that the interval is 50000256 which is not divisible by BR=128 so could that be screwing things up?
I have 8GB of RAM on that machine, but I never saw it use more than 1.4GB of RAM though. I'm now re-trying the range with the wilsontest2 code using MPIR. There also might have been a bad GMP5 library or something since my old mingw64 environment was misbehaving. Jeff.[/QUOTE] Now I understand you, interval should be divisible by 2*BR (=256, since BR=128) the correct assertion, because sg=interval/BR, but sg is also even. (your problem could be that in your case sg is an integer, but odd, and the primes are not stored, only the difference's in 2 bytes, so 2 differences in an unsigned int) Modified again the 2 codes. Yes, that uses less than 5 GB, the reason that your 71e9-70e9=1e9 range contains much less than 2*interval primes. |

[QUOTE=Jeff Gilchrist;271101]I was able to finish the testing myself, and the MPIR build is *much* faster.[/QUOTE]
I can confirm this. The same under Linux 64 Bit, speedup of factor 1.5 to 2 compared to GMP5, depending on input parameters. |

Some results with different intervals:
interval=50000128 Done the st=71000000000-en=72000000000 interval. Time=57585 sec. interval=5000192 Done the st=72000000000-en=73000000000 interval. Time=111822 sec. Huge difference in speed with those intervals. Testing 75000064 right now. |

[QUOTE=Jeff Gilchrist;271230]Some results with different intervals:
interval=50000128 Done the st=71000000000-en=72000000000 interval. Time=57585 sec. interval=5000192 Done the st=72000000000-en=73000000000 interval. Time=111822 sec. Huge difference in speed with those intervals. Testing 75000064 right now.[/QUOTE] My guess is that it will be at around 57500 sec. Reason is that there are only 40M primes in that interval. So except from other effects the speed should be the same. |

It will be faster; the interval parameter is used in two places in the software, in one place min(interval length, number of primes) is relevant, and in the other it isn't.
Compare the timings in my posts [url]http://www.mersenneforum.org/showpost.php?p=270756&postcount=12[/url] and [url]http://www.mersenneforum.org/showpost.php?p=271065&postcount=35[/url] in both of which the interval is larger than the number of primes in the range. To compare: [code] interval RAM time slices 1e8 3.647 79427.6 3 2e7 1.904 97210.0 3 1e7 0.983 126835.4 4 4e6 0.397 200194.4 11 [/code] (this is with wilsontest.c linked against gmp-5; I am rerunning one parameter choice with wilsontest2.c linked against mpir-2.4) |

[QUOTE=MrRepunit;271260]My guess is that it will be at around 57500 sec.
Reason is that there are only 40M primes in that interval. So except from other effects the speed should be the same.[/QUOTE] Everyone needs to keep in mind that Wilson primes are going to be very very rare. Much rarer than than Mersenne primes. They should be comparable in density (heuristically) to Wiefrich or Miramanoff primes. As John Selfridge said: We know that loglog N goes to infinity. However, noone has ever actually observed it doing so. |

[QUOTE=R.D. Silverman;271288]Everyone needs to keep in mind that Wilson primes are going to be
very very rare. Much rarer than than Mersenne primes. They should be comparable in density (heuristically) to Wiefrich or Miramanoff primes. As John Selfridge said: We know that loglog N goes to infinity. However, noone has ever actually observed it doing so.[/QUOTE] To put some actual figures: it should be reasonably easy to get to 10[SUP]13[/SUP] and the current known search-limit is around 10[SUP]11[/SUP]. The (heuristically) expected number of Wilson primes on that interval is [TEX]\log\left(\frac{13}{11}\right) \approx 17%[/TEX], which [I]for me[/I] is still worth the shot. However, at some point on one has to think if the odds are too low... |

[QUOTE=rajula;271289]To put some actual figures: it should be reasonably easy to get to 10[SUP]13[/SUP] and the current known search-limit is around 10[SUP]12[/SUP]. The (heuristically) expected number of Wilson primes on that interval is [TEX]\log\left(\frac{13}{12}\right) \approx 8%[/TEX], which [I]for me[/I] is still worth the shot. However, at some point on one has to think if the odds are too low...[/QUOTE]
I'm not certain where you got 1e12. Right now they are around 1e11. |

[QUOTE=rajula;271289]To put some actual figures: it should be reasonably easy to get to 10[SUP]13[/SUP] and the current known search-limit is around 10[SUP]12[/SUP]. The (heuristically) expected number of Wilson primes on that interval is [TEX]\log\left(\frac{13}{12}\right) \approx 8%[/TEX], which [I]for me[/I] is still worth the shot. However, at some point on one has to think if the odds are too low...[/QUOTE]
Slight nitpick. The use of percentage here is wrong. A percentage represents a faction with respect to some other value. The expected number (which is an absolute number) of Wilson primes up to N is ~C loglog(N), giving .08C as the number of expected primes in [1e12, 1e13] for some constant C. I have never seen a strong argument that gives the value of C. Is it 1?? |

All times are UTC. The time now is 12:24. |

Powered by vBulletin® Version 3.8.11

Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.