![]() |
![]() |
#12 |
Einyen
Dec 2003
Denmark
BBF16 Posts |
![]()
Crashed for me as well on Windows 7 64bit Q9450 and Windows XP 32 bit Pentium 4 with the 32 bit binary from: http://jpenne.free.fr/index2.html
Just make a worktodo.txt with these 2 lines: ABC$a*$b^$c$d 5 10 19737 3 and llr.ini with this: PgenInputFile=worktodo.txt Verbose=1 It passes the SPRP test but crashes as soon as Lucas test starts. Last fiddled with by ATH on 2011-03-02 at 02:34 |
![]() |
![]() |
![]() |
#13 |
"Mark"
Apr 2003
Between here and the
6,163 Posts |
![]()
What I'll try to do is reproduce the string of calls to gwnum routines that can produce the error in a small program. That would make it much easier for you to debug.
|
![]() |
![]() |
![]() |
#14 |
P90 years forever!
Aug 2002
Yeehaw, FL
2·7·521 Posts |
![]()
It looks like the problem is a call to gwsetaddin.
The gwnum.h include file states that you can only use this routine if abs(c) = 1. |
![]() |
![]() |
![]() |
#15 | |
May 2004
FRANCE
2×281 Posts |
![]() Quote:
I knew that, and used a gwsub3 in place but, alas... "to be sure", I still used gwsetaddin(gwdata, 0) to reset the addin constant to zero!! I thought this night that it could be the cause of the crash, and that is true! George and me found the bug almost simultaneously... But I am sorry for having wrongly worried you about that... I shall release the fixed development version soon. Best Regards, Jean |
|
![]() |
![]() |
![]() |
#16 |
May 2004
FRANCE
56210 Posts |
![]()
Hi George,
In this 3.8.5 development version, I implement the BPSW PRP test (see http://www.trnicely.net/misc/bpsw.html). In this test, the Q parameter may be negative, and then the following Frobenius test gives a wrong result if I use setmulbyconst (gwdata, Q)... This is not grave because I get the good result when multiplying by N+Q after the squaring, but perhaps it would be better to indicate this restriction in the gwnum.h file ? - Results using setmulbyconst : Starting probable prime test of 10^500+961 Using all-complex FFT length 192, a = 2 10^500+961 is base 2-Strong Fermat PRP! Time : 114.884 ms. Starting Lucas sequence Using all-complex FFT length 192, P = 1, Q = -3 10^500+961 is strong-Fermat and BPSW PRP, Starting Frobenius test sequence Using all-complex FFT length 192, Q = -3 10^500+961 is strong-Fermat and BPSW PSP (P = 1, Q = -3), but composite!!. Frobenius RES64: 3740D82555AE273E Time : 72.012 ms. Result using gwsafemul(gwdata, gwQ, x) after the squaring of x : Starting probable prime test of 10^500+961 Using all-complex FFT length 192, a = 2 10^500+961 is base 2-Strong Fermat PRP! Time : 33.443 ms. Starting Lucas sequence Using all-complex FFT length 192, P = 1, Q = -3 10^500+961 is strong-Fermat and BPSW PRP, Starting Frobenius test sequence Using all-complex FFT length 192, Q = -3 10^500+961 is strong-Fermat, BPSW and Frobenius PRP! (P = 1, Q = -3, D = 13) Time : 72.379 ms. Best Regards, Jean |
![]() |
![]() |
![]() |
#17 | |
P90 years forever!
Aug 2002
Yeehaw, FL
2·7·521 Posts |
![]() Quote:
I may need to download your development version to debug this. |
|
![]() |
![]() |
![]() |
#18 | |
May 2004
FRANCE
2·281 Posts |
![]() Quote:
You may download the source now from my development directory : http://jpenne.free.fr/Development/llr385devsrc.zip Please note it is not-at-all a stable version... - The problematic code is in "commonFrobeniusPRP" function. - Here is the problematic test (using gwsetmulbyconst) : >cllr -oDebug=1 -oBPSW=1 -d -q"10^500+961" Starting probable prime test of 10^500+961 Using all-complex FFT length 192, a = 2 10^500+961 is base 2-Strong Fermat PRP! Time : 1.532 sec. Starting Lucas sequence Using all-complex FFT length 192, P = 1, Q = -3 10^500+961 is strong-Fermat and BPSW PRP, Starting Frobenius test sequence Using all-complex FFT length 192, Q = -3 10^500+961 is strong-Fermat and BPSW PSP (P = 1, Q = -3), but composite!!. Frobenius RES64: 3740D82555AE273E Time : 3.876 sec. - Here is the successful test (using gwsafemul) : >cllr -oDebug=0 -oBPSW=1 -d -q"10^500+961" Starting probable prime test of 10^500+961 Using all-complex FFT length 192, a = 2 10^500+961 is base 2-Strong Fermat PRP! Time : 1.881 sec. Starting Lucas sequence Using all-complex FFT length 192, P = 1, Q = -3 10^500+961 is strong-Fermat and BPSW PRP, Starting Frobenius test sequence Using all-complex FFT length 192, Q = -3 10^500+961 is strong-Fermat, BPSW and Frobenius PRP! (P = 1, Q = -3, D = 13) Time : 5.063 sec. I made also these tests while displaying the 64 bit residues of the 10 first iterations, and saw that the residues differ as soon as after the first one! Thank you for your help and Best Regards, Jean |
|
![]() |
![]() |
![]() |
#19 |
P90 years forever!
Aug 2002
Yeehaw, FL
2·7·521 Posts |
![]()
The bug is in gianttogw for non-base-2 numbers.
If testing 10^500+n, then the numbers from 10^500 to 10^500+n-1 are not converted properly. Attached is a corrected gwnum.c. You can use it until I put together a 25.6 release. gwsetmulbyconst does work with negative numbers. |
![]() |
![]() |
![]() |
#20 | |
May 2004
FRANCE
56210 Posts |
![]() Quote:
But it is surprising! How can I get the correct result starting with a false converted value?? What a subtil bug.... Also, I cannot find here the attached corrected code, but it is not urgent... About the previous problem (the crash) : In the future, I would study more carefully the gwnum's specifications before using it... Best Regards, Jean |
|
![]() |
![]() |
![]() |
#21 |
P90 years forever!
Aug 2002
Yeehaw, FL
2·7·521 Posts |
![]()
My bad. Trying again.
|
![]() |
![]() |
![]() |
#22 |
May 2004
FRANCE
2×281 Posts |
![]() |
![]() |
![]() |