mersenneforum.org  

Go Back   mersenneforum.org > Math Stuff > Computer Science & Computational Number Theory

Reply
 
Thread Tools
Old 2011-09-07, 19:46   #45
R. Gerbicz
 
R. Gerbicz's Avatar
 
"Robert Gerbicz"
Oct 2005
Hungary

112·13 Posts
Default

Quote:
Originally Posted by Jeff Gilchrist View Post
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
Using the work file:
Code:
st=70000000000-en=71000000000
S[0]=70000000003
S[1]=70000000001
S[2]=70000000007
interval=50000256
printtofile=0
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.

Last fiddled with by R. Gerbicz on 2011-09-07 at 19:51
R. Gerbicz is offline   Reply With Quote
Old 2011-09-07, 19:58   #46
Jeff Gilchrist
 
Jeff Gilchrist's Avatar
 
Jun 2003
Ottawa, Canada

3×17×23 Posts
Default

Quote:
Originally Posted by R. Gerbicz View Post
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.
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.
Jeff Gilchrist is offline   Reply With Quote
Old 2011-09-07, 20:19   #47
R. Gerbicz
 
R. Gerbicz's Avatar
 
"Robert Gerbicz"
Oct 2005
Hungary

112·13 Posts
Default

Quote:
Originally Posted by Jeff Gilchrist View Post
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.
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.

Last fiddled with by R. Gerbicz on 2011-09-07 at 20:21
R. Gerbicz is offline   Reply With Quote
Old 2011-09-08, 21:05   #48
MrRepunit
 
MrRepunit's Avatar
 
Mar 2011
Germany

97 Posts
Default

Quote:
Originally Posted by Jeff Gilchrist View Post
I was able to finish the testing myself, and the MPIR build is *much* faster.
I can confirm this. The same under Linux 64 Bit, speedup of factor 1.5 to 2 compared to GMP5, depending on input parameters.
MrRepunit is offline   Reply With Quote
Old 2011-09-09, 00:00   #49
Jeff Gilchrist
 
Jeff Gilchrist's Avatar
 
Jun 2003
Ottawa, Canada

3×17×23 Posts
Default

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.
Jeff Gilchrist is offline   Reply With Quote
Old 2011-09-09, 05:23   #50
MrRepunit
 
MrRepunit's Avatar
 
Mar 2011
Germany

97 Posts
Default

Quote:
Originally Posted by Jeff Gilchrist View Post
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.
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.
MrRepunit is offline   Reply With Quote
Old 2011-09-09, 12:38   #51
fivemack
(loop (#_fork))
 
fivemack's Avatar
 
Feb 2006
Cambridge, England

33×239 Posts
Default

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

http://www.mersenneforum.org/showpos...6&postcount=12

and

http://www.mersenneforum.org/showpos...5&postcount=35

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
(this is with wilsontest.c linked against gmp-5; I am rerunning one parameter choice with wilsontest2.c linked against mpir-2.4)

Last fiddled with by fivemack on 2011-09-09 at 14:07
fivemack is offline   Reply With Quote
Old 2011-09-09, 13:15   #52
R.D. Silverman
 
R.D. Silverman's Avatar
 
"Bob Silverman"
Nov 2003
North of Boston

22·5·373 Posts
Default

Quote:
Originally Posted by MrRepunit View Post
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.
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.
R.D. Silverman is offline   Reply With Quote
Old 2011-09-09, 13:32   #53
rajula
 
rajula's Avatar
 
"Tapio Rajala"
Feb 2010
Finland

32·5·7 Posts
Default

Quote:
Originally Posted by R.D. Silverman View Post
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.
To put some actual figures: it should be reasonably easy to get to 1013 and the current known search-limit is around 1011. The (heuristically) expected number of Wilson primes on that interval is \log\left(\frac{13}{11}\right) \approx 17%, which for me is still worth the shot. However, at some point on one has to think if the odds are too low...

Last fiddled with by rajula on 2011-09-09 at 13:47 Reason: corrected some of the (possibly many) typos, limits, numbers, errors...
rajula is offline   Reply With Quote
Old 2011-09-09, 13:43   #54
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

5·113 Posts
Default

Quote:
Originally Posted by rajula View Post
To put some actual figures: it should be reasonably easy to get to 1013 and the current known search-limit is around 1012. The (heuristically) expected number of Wilson primes on that interval is \log\left(\frac{13}{12}\right) \approx 8%, which for me is still worth the shot. However, at some point on one has to think if the odds are too low...
I'm not certain where you got 1e12. Right now they are around 1e11.
rogue is offline   Reply With Quote
Old 2011-09-09, 13:53   #55
R.D. Silverman
 
R.D. Silverman's Avatar
 
"Bob Silverman"
Nov 2003
North of Boston

22×5×373 Posts
Default

Quote:
Originally Posted by rajula View Post
To put some actual figures: it should be reasonably easy to get to 1013 and the current known search-limit is around 1012. The (heuristically) expected number of Wilson primes on that interval is \log\left(\frac{13}{12}\right) \approx 8%, which for me is still worth the shot. However, at some point on one has to think if the odds are too low...
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??
R.D. Silverman is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Twin prime search? MooooMoo Twin Prime Search 115 2010-08-29 17:38
k=51 or about coordinated prime search Kosmaj Riesel Prime Search 7 2007-07-13 22:15
Prime Search on PS-3? Kosmaj Riesel Prime Search 6 2006-11-21 15:19
Genetics and Wilson's theorem David John Hill Jr Science & Technology 2 2006-05-10 14:10
Generalized wilson's theorem bouayoun Math 3 2004-03-12 18:24

All times are UTC. The time now is 22:05.


Tue Jul 5 22:05:20 UTC 2022 up 82 days, 20:06, 0 users, load averages: 1.50, 1.31, 1.32

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔