![]() |
![]() |
#23 |
Just call me Henry
"David"
Sep 2007
Liverpool (GMT/BST)
141048 Posts |
![]()
I get:
Code:
E:\OurDevelopment\David\Pascal>Quad.exe 1500 0 2 Initializing Primes ... Done. Quad n=1500 k=27-1999999999977 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=3-1999999995 p<=1190494759 Initializing Sieve ... Done. Runtime error 216 at $0000000100001F2B $0000000100001F2B $00000001000022A0 $00000001000090B5 "C:\Program Files\FPC\2.6.0\bin\i386-win32\ppcrossx64" -Sg Quad.pas "C:\Program Files\FPC\2.6.0\bin\i386-win32\ppcrossx64" -Sg triple.pas any hints? |
![]() |
![]() |
![]() |
#24 |
Jun 2003
2×7×17×23 Posts |
![]()
can you compile with -gl option and post the debug output?
|
![]() |
![]() |
![]() |
#25 |
Just call me Henry
"David"
Sep 2007
Liverpool (GMT/BST)
22×1,553 Posts |
![]() |
![]() |
![]() |
![]() |
#26 |
Just call me Henry
"David"
Sep 2007
Liverpool (GMT/BST)
22·1,553 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 := n-x; { - } 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 2012-04-15 at 21:00 |
![]() |
![]() |
![]() |
#27 | ||
Jun 2003
2×7×17×23 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. |
||
![]() |
![]() |
![]() |
#28 |
Just call me Henry
"David"
Sep 2007
Liverpool (GMT/BST)
11000010001002 Posts |
![]()
Downloading the windows sdk to get ml64.exe which is needed for -al
|
![]() |
![]() |
![]() |
#29 |
Jun 2009
22×52×7 Posts |
![]()
So who can / will extend this to 6-, 7-, 8-tuplets or even farther? I know I can't
![]() |
![]() |
![]() |
![]() |
#30 |
Just call me Henry
"David"
Sep 2007
Liverpool (GMT/BST)
184416 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? |
![]() |
![]() |
![]() |
#31 | |
Jun 2003
2·7·17·23 Posts |
![]() Quote:
EDIT:- Did you, by any chance, use the -gl setting along with the -al setting? Last fiddled with by axn on 2012-04-16 at 21:05 |
|
![]() |
![]() |
![]() |
#32 | |
Just call me Henry
"David"
Sep 2007
Liverpool (GMT/BST)
22×1,553 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. |
|
![]() |
![]() |
![]() |
#33 | |
Jun 2003
2×7×17×23 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 | |
![]() |
||||
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 | 2017-04-28 00:08 |
Efficiently finding a linear progression in data | fivemack | Math | 27 | 2015-12-12 18:42 |
GPU Prime Sieve | tapion64 | GPU Computing | 7 | 2014-04-10 06:15 |
Sieve depth vs. prime probability | Unregistered | Information & Answers | 2 | 2010-05-25 20:51 |
Prime in Riesel Sieve Project | Sloth | Prime Sierpinski Project | 1 | 2006-05-10 02:02 |