mersenneforum.org  

Go Back   mersenneforum.org > Prime Search Projects > Sierpinski/Riesel Base 5

Reply
 
Thread Tools
Old 2007-11-02, 23:04   #397
geoff
 
geoff's Avatar
 
Mar 2003
New Zealand

13·89 Posts
Default sr2sieve 1.6.12

This version fixes two bugs in the Sobistrator compatibility mode (when using the -j switch):

1. Ranges in SoBStatus.dat are now written with the pmax= line before the pmin= line. Ranges read from SoBStatus.dat and nextrange.txt can now have the lines in either order.

2. Now when the -r switch is given with the -j switch, RieselStatus.dat is used instead of SoBStatus.dat.
geoff is offline   Reply With Quote
Old 2007-11-08, 01:16   #398
geoff
 
geoff's Avatar
 
Mar 2003
New Zealand

13·89 Posts
Default sr1sieve 1.2.2, sr2sieve 1.6.13

When a factor p is found to divide a term k*b^n+c, these versions now check whether p == k*b^n+c, and if so the term is logged as a prime but not removed from the sieve and not reported as a factor.

This behaviour is compatible with srsieve, but not with NewPGen or most other sieve programs. It only ever affects terms with exponents n <= 64.

In some situations leaving a small prime term in the sieve can impede performance, as it can form exceptions to otherwise regular patterns in the remaining exponents. If in doubt, test all small terms with LLR then remove them from the sieve manually.
geoff is offline   Reply With Quote
Old 2007-11-21, 16:13   #399
Flatlander
I quite division it
 
Flatlander's Avatar
 
"Chris"
Feb 2005
England

1000000111012 Posts
Default Minor (i.e. unimportant) bug

sr1sieve1.exe 1.2.1

The seconds per factor readout seems to be inaccurate. After saying '9 seconds' every time I looked for two hours, I restarted. It now says '63 seconds' which looks about right.
Flatlander is offline   Reply With Quote
Old 2007-11-24, 01:04   #400
jasong
 
jasong's Avatar
 
"Jason Goatcher"
Mar 2005

350710 Posts
Default

Uh, geoff, I have a request. Someone told me it was a "small" request, but I don't know enough number theory to know whether or not they're correct.

I have a friend, I won't give his name since he wants the information about what he's working on kept secret, but he believes that he's found, through number theory, a k that will produce many, many primes, on both the +1 and -1 sides. The problem is I don't know of an efficient way to sieve twin prime files on fixed n instead of k. That's where my request comes in.

Would it be possible for you to make a twin prime feature in srsieve or sr2sieve(or both) that would allow a fixed k, range of n sieve for twin primes?
jasong is offline   Reply With Quote
Old 2007-12-02, 00:48   #401
geoff
 
geoff's Avatar
 
Mar 2003
New Zealand

22058 Posts
Default

Quote:
Originally Posted by Flatlander View Post
sr1sieve1.exe 1.2.1

The seconds per factor readout seems to be inaccurate. After saying '9 seconds' every time I looked for two hours, I restarted. It now says '63 seconds' which looks about right.
The sec/factor statistic reported by sr[125]sieve is an overall average, it will seem too low if the factor density has dropped significantly since sieving started. (srsieve reports a rolling average based on the last 32 factors, but this also gives unexpected results in some situations).

I haven't been able to think of a good way solve this yet. Any suggestions for a better formula in terms of these variables would be welcome:

Code:
t_start:        Time at start of sieve.
t_curr/t_prev:  Time at current/previous status report.
p_start:        Start of sieve range.
p_curr/p_prev:  p at current/previous status report.
f_curr:         Number of factors found so far.
The current formula used by sr1sieve is simply

Code:
  (t_curr - t_prev) * (p_curr - p_start)
  --------------------------------------
        (p_curr - p_prev) * f_curr
For anyone trying to decide when to stop sieving and start LLR testing, I would recommend using the method given by axn1 in this post instead of relying on the sec/factor statistic.
geoff is offline   Reply With Quote
Old 2007-12-02, 02:59   #402
axn
 
axn's Avatar
 
Jun 2003

508210 Posts
Default

I forget the actual name of the technique, but you can use a "weighted historical decay" (I totally made that name up -- like I said, forgot what it is called).

Basic idea: you have a historical average h, and a new data point d, then you calculate the new average as d*c + (1-c)*h, where c is a weighting factor in the range (0,1). Higher the c, the more dominant the latest data point, and probably more fluctuations in the outcome. The lower the c, the smoother the output, but it won't probably react quickly enough to an actual change in the nature of the data. This technique has the obvious advantage that you only need to keep one piece of information at any given time (namely, h) rather than a list of things required for the rolling average, while still obtaining some of the sanity of a rolling average.

For the purpose of the sieve, a c in the range 0.05-0.2 should be sufficient. I think it is probably better to plug in f/s rather than s/f in this formula.

Something like rate_{new} = (f_{curr} - f_{prev}) / (t_{curr}-t_{prev}) * c + rate_{old} * (1-c)

Note that, f_{curr} - f_{prev} could well be zero, so ...

And while outputting, do something like:
Code:
if rate < 1 
  print 1/rate "sec/factor"
else
  print rate "factor/sec"

Last fiddled with by axn on 2007-12-02 at 03:00
axn is online now   Reply With Quote
Old 2007-12-02, 22:43   #403
geoff
 
geoff's Avatar
 
Mar 2003
New Zealand

13×89 Posts
Default sr1sieve 1.2.3, sr[25]sieve 1.6.14, bug fix

These versions fix a bug that could cause a segfault in some situations. Thanks to AES for discovering it.

The bug could occur when the range of n in the sieve is very narrow. Exactly how narrow depends on a lot of factors, but the simplest way to check is to run with the -vv switch and look for a message like:

BSGS range: X1*Y1 - X2*Y2.

If both X1 and X2 (or just X1 for the x86-64 executable) are less than 8 then the bug MIGHT have affected the sieve.

Large projects like SR5, RieselSieve SOB/PSP, etc. were not affected.
geoff is offline   Reply With Quote
Old 2007-12-03, 00:09   #404
geoff
 
geoff's Avatar
 
Mar 2003
New Zealand

13·89 Posts
Default

Quote:
Originally Posted by jasong View Post
Would it be possible for you to make a twin prime feature in srsieve or sr2sieve(or both) that would allow a fixed k, range of n sieve for twin primes?
There is a message earlier in this thread on this topic. To sieve for twins of the form k*b^n+/-1, sieve the sequence (k*b^n+1)(k*b^n-1) = (k^2)*(b^2)^n-1.
geoff is offline   Reply With Quote
Old 2007-12-03, 21:58   #405
geoff
 
geoff's Avatar
 
Mar 2003
New Zealand

13×89 Posts
Default

Quote:
Originally Posted by geoff View Post
These versions fix a bug that could cause a segfault in some situations. Thanks to AES for discovering it.
After closer checking I see that this bug could only have affected the x86-64 executable, and only srsieve versions 1.2.0-1.2.2 and sr2sieve versions 1.6.3-1.6.13 were affected. The only case where I have been able to actually trigger the bug is when the input sieve file contains exactly one term.
geoff is offline   Reply With Quote
Old 2007-12-04, 15:31   #406
Cruelty
 
Cruelty's Avatar
 
May 2005

23·7·29 Posts
Default

Does it mean that the software could have missed some factors or falsely reported factors?

Last fiddled with by Cruelty on 2007-12-04 at 15:36
Cruelty is offline   Reply With Quote
Old 2007-12-04, 23:54   #407
geoff
 
geoff's Avatar
 
Mar 2003
New Zealand

13×89 Posts
Default

Quote:
Originally Posted by Cruelty View Post
Does it mean that the software could have missed some factors or falsely reported factors?
It couldn't report false factors, it is possible that factors were missed, however by far the most likely result is that the program would crash soon after starting, and if it didn't crash then it is unlikely that the bug had any other effect.
geoff is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Very Prime Riesel and Sierpinski k robert44444uk Open Projects 587 2016-11-13 15:26
Sierpinski/ Riesel bases 6 to 18 robert44444uk Conjectures 'R Us 139 2007-12-17 05:17
Sierpinski/Riesel Base 10 rogue Conjectures 'R Us 11 2007-12-17 05:08
Sierpinski / Riesel - Base 23 michaf Conjectures 'R Us 2 2007-12-17 05:04
Sierpinski / Riesel - Base 22 michaf Conjectures 'R Us 49 2007-12-17 05:03

All times are UTC. The time now is 12:11.


Mon Aug 2 12:11:55 UTC 2021 up 10 days, 6:40, 0 users, load averages: 1.49, 1.53, 1.48

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, 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.