![]() |
|
|
#34 |
|
Account Deleted
"Tim Sorbera"
Aug 2006
San Antonio, TX USA
17·251 Posts |
As Max said, LLR always tells you the FFT length. No problem there. The problem is easily seeing where the cutoffs are. You can do this for base 2 with the fft_len utility (designed and easy for a single k, not quite so easy for a range of k's, but still quite workable), but (AFAIK) there's no similar thing for other bases.
Last fiddled with by Mini-Geek on 2010-02-16 at 23:01 |
|
|
|
|
|
#35 | |
|
A Sunny Moo
Aug 2007
USA (GMT-5)
3·2,083 Posts |
Quote:
|
|
|
|
|
|
|
#36 | |
|
Account Deleted
"Tim Sorbera"
Aug 2006
San Antonio, TX USA
10AB16 Posts |
Quote:
http://www.mersenneforum.org/showthr...2302#post62302 I don't know exactly how it works or how to modify it to work for other bases (if possible). These seem to be the critical lines of code: (from llrtools.c; log2k is the base 2 logarithm of k) Code:
if (k < 1048576) /* is k < 2^20 ??? */
nmax = n_mersenne -= (long)(log2k + log2k*(double)(fftlen/2));
else /* zero-padded FFT is used, if k > 2^20 */
nmax = (long)(((double)n_mersenne + (double)fftlen*0.3)/2.0);
(and this is about what the program in fact does return: 339028, the difference probably attributable to my 8.23 estimation) I don't see anything there that can easily convert to other bases. But that might just be because I don't really know what's going on with that formula and why it's accurate.
Last fiddled with by Mini-Geek on 2010-02-16 at 23:24 |
|
|
|
|
|
|
#37 |
|
P90 years forever!
Aug 2002
Yeehaw, FL
22×7×269 Posts |
Selecting an FFT length is surprisingly complex. The code is buried in gwnum.c of the 25.13 sources (the key routine is gwinfo). How complex is it? Imagine testing k*b^n+c with k, b, and c constant you could run into a case where n uses one FFT length, increasing n by 1 uses a larger FFT length, but increasing n by 2 is back using the smaller FFT length!
LLR should not be selecting FFT length or maximum n - it should let the gwnum handle these calculations. In general, base-2 FFTs will always be faster than non-base-2 FFTs for the same FFT length. This is because the rounding and carry propagation code is more complex for non-base-2. |
|
|
|
|
|
#38 | |
|
May 2004
FRANCE
11048 Posts |
Quote:
All versions of LLR let gwnum calculate the FFT length. I always thought it is the better thing to do ! Best Regards, Jean |
|
|
|
|
![]() |
| Thread Tools | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Comparison of NFS tools | CRGreathouse | Factoring | 3 | 2018-02-05 14:55 |
| APRCL implementations comparison | ldesnogu | Computer Science & Computational Number Theory | 11 | 2015-10-28 12:54 |
| Comparison Page Not Working | wblipp | Operation Billion Digits | 0 | 2012-11-24 06:33 |
| PFGW 3.3.6 or PFGW 3.4.2 Please update now! | Joe O | Sierpinski/Riesel Base 5 | 5 | 2010-09-30 14:07 |
| Pollard's Algorithm & That of Devaraj-a comparison | devarajkandadai | Miscellaneous Math | 22 | 2005-06-10 11:13 |