mersenneforum.org  

Go Back   mersenneforum.org > Prime Search Projects > Prime Gap Searches

Reply
 
Thread Tools
Old 2019-05-17, 06:27   #67
robert44444uk
 
robert44444uk's Avatar
 
Jun 2003
Oxford, UK

3·54 Posts
Default

Quote:
Originally Posted by firejuggler View Post
just saying'

Code:
4905 9000382149988845
how do I calculate merit? what's the twin prime constant?
Very nice gap! 26.177 merit - 3rd highest to date

My best overnight was 3938 280639717928435 25.379742

Merit formula: if the twin prime constant is pi(2), g= your reported gap, and n = your big 9e14 value, then the merit is 6g*pi(2)/ln(6n+1)^2

For TPC see https://primes.utm.edu/glossary/page...nPrimeConstant

Last fiddled with by robert44444uk on 2019-05-17 at 06:32
robert44444uk is offline   Reply With Quote
Old 2019-05-17, 07:28   #68
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Cambridge (GMT/BST)

2·2,861 Posts
Default

How does newpgen compare with fbncsieve for speed? I think that is probably worth investigating
henryzz is offline   Reply With Quote
Old 2019-05-17, 08:00   #69
robert44444uk
 
robert44444uk's Avatar
 
Jun 2003
Oxford, UK

3×54 Posts
Default

Quote:
Originally Posted by henryzz View Post
How does newpgen compare with fbncsieve for speed? I think that is probably worth investigating
We should add the perl function mentioned above within the perl script. Then you would have a proper race.

I think the best solution without doubt would come if someone could update Robert Gerbicz's c-program that was used to generate prime gaps - 1e15 took no time at all!
robert44444uk is offline   Reply With Quote
Old 2019-05-17, 08:02   #70
robert44444uk
 
robert44444uk's Avatar
 
Jun 2003
Oxford, UK

187510 Posts
Default

Quote:
Originally Posted by Thomas11 View Post
The test run revealed the following new gaps, luckily including one for 3016:
Code:
3016 9000000000206619002
3246 9000000000189953452
3270 9000000000039902107
3650 9000000000092227858
3770 9000000000022662393
3865 9000000000125118057
But I suppose all of them would be replaced soon by lower k's.
Here's one - probably not first instance

3016 280841015355407

Last fiddled with by robert44444uk on 2019-05-17 at 08:03
robert44444uk is offline   Reply With Quote
Old 2019-05-17, 10:28   #71
robert44444uk
 
robert44444uk's Avatar
 
Jun 2003
Oxford, UK

3·54 Posts
Default

Quote:
Originally Posted by robert44444uk View Post
We should add the perl function mentioned above within the perl script. Then you would have a proper race.
This perl program takes 3 minutes on a single thread to do 10 iterations, so that's 18 seconds per iteration. I think this may be faster. Lets see if other methods improve.

Code:
#!/usr/bin/env perl
use warnings;
use strict;
use Math::GMPz;
use Math::BigFloat lib=>"GMP";
use Math::Prime::Util qw/:all/;
use v5.10;
use List::MoreUtils qw/all/;
use Timer::Runtime;

$|=1;

my $interval = 200_000_000;
my $overlap = 10_000;
my $numberofiterations = 10;
my $from = 3.7e14;
my $reportsmallgapmult = 1_800;


for (my $k=0; $k <= $numberofiterations; $k++)
	{ 
	my $fromnew = $from+$k*$interval;
	my $endnew = $fromnew+$interval+$overlap;
	say "doing from ", $fromnew, " to ",$endnew;	
	my $start = 6*$fromnew;
	my $end = $start+($interval+$overlap)*6;
	my @twins = sieve_prime_cluster($start, $end, 2);
	
	for (my $l=1; $l <= scalar @twins-1; $l++)
		{  
		my $gap = ($twins[$l]-$twins[$l-1]);
		if ($gap>=$reportsmallgapmult*6) 
			{
			my $firsttwin = ($twins[$l-1]+1)/6;
			my $reportedgap = $gap/6;
			
			say $reportedgap, " ", $firsttwin;
			}
	
		}
	}
robert44444uk is offline   Reply With Quote
Old 2019-05-17, 21:17   #72
firejuggler
 
firejuggler's Avatar
 
Apr 2010
Over the rainbow

3×11×73 Posts
Default

another showing off

Code:
3104 9001387635261233
firejuggler is online now   Reply With Quote
Old 2019-05-20, 09:45   #73
Thomas11
 
Thomas11's Avatar
 
Feb 2003

3·5·127 Posts
Default

Quote:
Originally Posted by henryzz View Post
How does newpgen compare with fbncsieve for speed? I think that is probably worth investigating
I did some tests but found twinsieve (sibling of fbncsieve) significantly slower than newpgen, e.g. 11.5 secs vs. 6.4 secs for the same 2e8 range.
Thomas11 is offline   Reply With Quote
Old 2019-05-20, 12:35   #74
Thomas11
 
Thomas11's Avatar
 
Feb 2003

190510 Posts
Default

Quote:
Originally Posted by robert44444uk View Post
This perl program takes 3 minutes on a single thread to do 10 iterations, so that's 18 seconds per iteration. I think this may be faster. Lets see if other methods improve.
Are your timings correct?
On my machine it takes only about 30 seconds.
And in comparison with the newpgen/perl combo it is actually much faster!
(3 secs vs. 10.3 secs per 2e8 block).
Thomas11 is offline   Reply With Quote
Old 2019-05-20, 13:47   #75
Thomas11
 
Thomas11's Avatar
 
Feb 2003

3·5·127 Posts
Default

My timings above are for Linux.
I did the same test (for only one iteration) on the same machine under Windows 10 and there it is much slower: 2 minutes (Win) vs. 3 secs (Linux)!

Could be some (optimization) issue with the Perl modules (I'm using Strawberry Perl on Windows).

Last fiddled with by Thomas11 on 2019-05-20 at 13:48
Thomas11 is offline   Reply With Quote
Old 2019-05-20, 16:27   #76
firejuggler
 
firejuggler's Avatar
 
Apr 2010
Over the rainbow

3·11·73 Posts
Default

these are my timing with 2 threads for cnewpgen ( on win 10)

http://prntscr.com/nr0vbl
Attached Thumbnails
Click image for larger version

Name:	timings.png
Views:	28
Size:	45.0 KB
ID:	20403  
firejuggler is online now   Reply With Quote
Old 2019-05-20, 18:50   #77
robert44444uk
 
robert44444uk's Avatar
 
Jun 2003
Oxford, UK

3·54 Posts
Default

Quote:
Originally Posted by Thomas11 View Post
Are your timings correct?
On my machine it takes only about 30 seconds.
And in comparison with the newpgen/perl combo it is actually much faster!
(3 secs vs. 10.3 secs per 2e8 block).
That's encouraging. I did my tests on a heavily loaded machine. Can't check now cos I'm travelling.

Can anyone make the perl program multithread?

Last fiddled with by robert44444uk on 2019-05-20 at 18:55
robert44444uk is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Gaps between maximal prime gaps Bobby Jacobs Prime Gap Searches 52 2020-08-22 15:20
I found a sieve to search all pairs of twin primes Pietro Maiorana Twin Prime Search 8 2019-09-26 23:07
find very easy twin prime in the infamy twin primes hal1se Miscellaneous Math 13 2018-11-05 16:34
Mersenne Primes p which are in a set of twin primes is finite? carpetpool Miscellaneous Math 3 2017-08-10 13:47
Gaps of Primes? PawnProver44 Miscellaneous Math 10 2016-04-10 19:32

All times are UTC. The time now is 02:00.

Tue Sep 22 02:00:46 UTC 2020 up 11 days, 23:11, 0 users, load averages: 1.81, 1.48, 1.48

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