20120415, 15:39  #23 
Just call me Henry
"David"
Sep 2007
Cambridge (GMT/BST)
2×29×101 Posts 
I get:
Code:
E:\OurDevelopment\David\Pascal>Quad.exe 1500 0 2 Initializing Primes ... Done. Quad n=1500 k=271999999999977 p<=1190494759 Initializing Sieve ... Done. Runtime error 216 at $000000010000206B $000000010000206B $00000001000023E0 $00000001000091F5 E:\OurDevelopment\David\Pascal>triple.exe 1500 0 2 Initializing Primes ... Done. Triple n=1500 k=31999999995 p<=1190494759 Initializing Sieve ... Done. Runtime error 216 at $0000000100001F2B $0000000100001F2B $00000001000022A0 $00000001000090B5 "C:\Program Files\FPC\2.6.0\bin\i386win32\ppcrossx64" Sg Quad.pas "C:\Program Files\FPC\2.6.0\bin\i386win32\ppcrossx64" Sg triple.pas any hints? 
20120415, 16:32  #24 
Jun 2003
7×19×37 Posts 
can you compile with gl option and post the debug output?

20120415, 18:52  #25 
Just call me Henry
"David"
Sep 2007
Cambridge (GMT/BST)
2×29×101 Posts 

20120415, 20:56  #26 
Just call me Henry
"David"
Sep 2007
Cambridge (GMT/BST)
2·29·101 Posts 
Am I correct in thinking that adding +11 to to search for quintuplets isn't that hard? You used 6 all over the triplet code and 30 all over the quads code. Quads needed 30 because 7>6. Quins can keep 30 as 11<30 so all that needs adding is
Code:
{ c = +1 ==> x = [11*t+k] } x := t*2; if(x >= n) then x := x  n; {2t} x := x*2; if(x >= n) then x := x  n; {4t} x := x+t; if(x >= n) then x := x  n; {5t} x := x*2; if(x >= n) then x := x  n; {10t} x := x+t; if(x >= n) then x := x  n; {11t} x := x+k; if(x >= n) then x := x  n; {11t+k} if(x > 0) then x := nx; {  } ndx[i, 5] := x; Is there any way of me getting it running not under debug logging? edit: Is the minimum n of 1000 critical? from the code I would guess that n=31 or maybe 61 would actually be the minimum for the quads code. I will experiment comparing with newpgen's output. Last fiddled with by henryzz on 20120415 at 21:00 
20120415, 22:42  #27  
Jun 2003
7×19×37 Posts 
Quote:
Quote:
You're right. That check was added to make sure that you are using sensible n values. I think n = 30 would be the lowest. As long as k*2^n > max sieve prime it should be fine. 

20120416, 12:25  #28 
Just call me Henry
"David"
Sep 2007
Cambridge (GMT/BST)
16E2_{16} Posts 
Downloading the windows sdk to get ml64.exe which is needed for al

20120416, 16:23  #29 
Jun 2009
2AB_{16} Posts 
So who can / will extend this to 6, 7, 8tuplets or even farther? I know I can't

20120416, 16:50  #30 
Just call me Henry
"David"
Sep 2007
Cambridge (GMT/BST)
2·29·101 Posts 
I think I should be able to extend it to 6 7 or 8 tuplets
I have attached the .s file produced by ppcrossx64 al masm then fails to assemble it with mulitple errors of the following types: Quad.s(1060) : error A2101:cannot add two relocatable labels Quad.s(1072) : error A2022:instruction operands must be the same size Looks to me like the assembler included in ppcrossx64 lets the code get away with something that it shouldn't and masm picks up on it. Anyone know the best pfgw ABC header for quads or larger? 
20120416, 21:04  #31  
Jun 2003
7×19×37 Posts 
Quote:
EDIT: Did you, by any chance, use the gl setting along with the al setting? Last fiddled with by axn on 20120416 at 21:05 

20120416, 21:21  #32  
Just call me Henry
"David"
Sep 2007
Cambridge (GMT/BST)
2×29×101 Posts 
Quote:
I have produced versions for quintuples and sextuples. They have hardly been tested and I am only pretty certain I added 5 right as it is negative. The source is attached. 

20120416, 22:30  #33  
Jun 2003
7·19·37 Posts 
Quote:
I am thinking of rewriting the whole thing in C without asm. They look correct. Note that for sextuples, you can include 7 (30 becomes 210) also into the mix and thus be 7 times faster. 

Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
How/Where to get Jens Kruse Andersen's prime constellation sieve?  Stargate38  And now for something completely different  2  20170428 00:08 
Efficiently finding a linear progression in data  fivemack  Math  27  20151212 18:42 
GPU Prime Sieve  tapion64  GPU Computing  7  20140410 06:15 
Sieve depth vs. prime probability  Unregistered  Information & Answers  2  20100525 20:51 
Prime in Riesel Sieve Project  Sloth  Prime Sierpinski Project  1  20060510 02:02 