![]() |
|
|
#1 |
|
Banned
"Luigi"
Aug 2002
Team Italia
32×5×107 Posts |
I am working with LLR Version 3.8.20, using Gwnum Library Version 28.13 and would like to discuss a somewhat annoying issue (not a real bug).
I am testing double Mersenne numbers' possible factors of the type 2k(2^p-1)+1 using the alternate form 2k*2^p - 2k +1 (k=600,000-2,000,000) using an ABC file like this one: Code:
ABC $a*2^$b+$c 1202106 859433-1202105 1202296 859433-1202295 ... ... 3999792 859433-3999791 Code:
Starting probable prime test of 1202106*2^859433-1202105 Using zero-padded type-1 FFT length 84K, Pass1=112, Pass2=768, 2 threads, a = 3 Code:
Starting probable prime test of 3999792*2^859433-3999791 Using generic reduction Pentium4 FFT length 80K, Pass1=320, Pass2=256, 2 threads, a = 3 A similar behaviour has been noticed with pfgw 3.7.10, so I consider it a "feature" of the GWnum library. It seems that somewhere between k = 600,000 and k=2,000,000 a limit is reached that switches the algorithm used to compute the element. Question (especially to George): is this change in behaviour due to avoid an overflow of a "double" typed variable when the number to be tested grows up? Is it a "safe limit" that can be overridden? If so, how? Luigi |
|
|
|
|
|
#2 |
|
P90 years forever!
Aug 2002
Yeehaw, FL
752610 Posts |
This is a feature.
The algorithm for selecting the FFT to test k*b^n+c is gruesomely complex. If you're curious, look at the gwinfo routine in gwnum.c. In short, increasing k and/or c decreases the number of bits I can stuff into an FFT word without getting a roundoff error. If k and c are too big, then it either "can't be done" or "can't be done without rewriting the carry propagation code to spread carries over more FFT words which is just too hard to do and may not even be possible using the current memory layout which would require even more code changes than are worth considering". There is a gwnum entry called safety_margin which can be used to "be more aggressive", but that would only buy you a few more lines in ABC file. |
|
|
|
|
|
#3 | |
|
Banned
"Luigi"
Aug 2002
Team Italia
481510 Posts |
Quote:
This means that using the ABC file Code:
ABC 2*$a*(2^859433-1)+1 601053 601148 601149 601205 601293 601296 Luigi |
|
|
|
|
|
|
#4 | |
|
Jun 2003
13BD16 Posts |
Quote:
|
|
|
|
|
|
|
#5 | |
|
Banned
"Luigi"
Aug 2002
Team Italia
32·5·107 Posts |
Quote:
It looks like after juggling with Mersenne numbers factorization algorithm, I should learn something about LL, Riesel and Sierpinski numbers' primality test theory. |
|
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| GWNUM program | paulunderwood | Programming | 54 | 2021-02-10 12:46 |
| A possible bug in LLR/PFGW while using GWNUM (no bug in P95) | Batalov | Software | 77 | 2015-04-14 09:01 |
| LLR V3.8.2 using gwnum 26.2 is available! | Jean Penné | Software | 25 | 2010-11-01 15:18 |
| GWNUM? | Unregistered | Information & Answers | 3 | 2010-09-12 19:52 |
| GWNUM as DLL? | Cyclamen Persicum | Software | 1 | 2007-01-02 20:53 |