mersenneforum.org GAPS BETWEEN PRIME PAIRS (Twin Primes)
 Register FAQ Search Today's Posts Mark Forums Read

2019-05-17, 06:27   #67
robert44444uk

Jun 2003
Oxford, UK

3·54 Posts

Quote:
 Originally Posted by firejuggler 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

 2019-05-17, 07:28 #68 henryzz Just call me Henry     "David" Sep 2007 Cambridge (GMT/BST) 2·2,861 Posts How does newpgen compare with fbncsieve for speed? I think that is probably worth investigating
2019-05-17, 08:00   #69
robert44444uk

Jun 2003
Oxford, UK

3×54 Posts

Quote:
 Originally Posted by henryzz 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!

2019-05-17, 08:02   #70
robert44444uk

Jun 2003
Oxford, UK

187510 Posts

Quote:
 Originally Posted by Thomas11 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

2019-05-17, 10:28   #71
robert44444uk

Jun 2003
Oxford, UK

3·54 Posts

Quote:
 Originally Posted by robert44444uk 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;
}

}
}

 2019-05-17, 21:17 #72 firejuggler     Apr 2010 Over the rainbow 3×11×73 Posts another showing off Code: 3104 9001387635261233
2019-05-20, 09:45   #73
Thomas11

Feb 2003

3·5·127 Posts

Quote:
 Originally Posted by henryzz 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.

2019-05-20, 12:35   #74
Thomas11

Feb 2003

190510 Posts

Quote:
 Originally Posted by robert44444uk 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.
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).

 2019-05-20, 13:47 #75 Thomas11     Feb 2003 3·5·127 Posts 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
 2019-05-20, 16:27 #76 firejuggler     Apr 2010 Over the rainbow 3·11·73 Posts these are my timing with 2 threads for cnewpgen ( on win 10) http://prntscr.com/nr0vbl Attached Thumbnails
2019-05-20, 18:50   #77
robert44444uk

Jun 2003
Oxford, UK

3·54 Posts

Quote:
 Originally Posted by Thomas11 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

 Similar Threads Thread Thread Starter Forum Replies Last Post Bobby Jacobs Prime Gap Searches 52 2020-08-22 15:20 Pietro Maiorana Twin Prime Search 8 2019-09-26 23:07 hal1se Miscellaneous Math 13 2018-11-05 16:34 carpetpool Miscellaneous Math 3 2017-08-10 13:47 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