![]() |
|
|
#320 | ||
|
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
36·13 Posts |
Quote:
You could test N=191 for k's up to 29 bits is size. Current nominal limit is N<224. You could test N=223 for k's up to 29 bits is size. Quote:
Code:
FermatFactor=217,16384,32767 ; Suyama (1980) I think I want to modify the code a little bit to report factors in the normalized form. (Albeit it is not too hard to do by hand. But doing it all the time for GFN factors is getting a bit old for me and the output is looking horrendous, even if awe-inspiring) E.g. Code:
GF(181,3) has a factor: 2269880559811350882108268285448756599351611328777559153780432306177 [TF:220:221:mmff-gfn3 0.28 mfaktc_barrett224_F160_191gs] GF(199,5) has a factor: 5240660087353831676253871671260590507538335119049430450977887836562259969 [TF:241:242:mmff-gfn5 0.28 mfaktc_barrett247_F192_223gs] GF(206,12) has a factor: 26264920974787795159990461827258813827760860586148343034700355283076513793 [TF:243:244:mmff-gfn12 0.28 mfaktc_barrett247_F192_223gs] Code:
GF(181,3) has a factor: 370291543969*2^182+1 [TF:220:221:mmff-gfn3 0.28 mfaktc_barrett224_F160_191gs] GF(199,5) has a factor: 407658847371*2^203+1 [TF:241:242:mmff-gfn5 0.28 mfaktc_barrett247_F192_223gs] GF(206,12) has a factor: 15961621533*2^210+1 [TF:243:244:mmff-gfn12 0.28 mfaktc_barrett247_F192_223gs] |
||
|
|
|
|
|
#321 |
|
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
36×13 Posts |
Here is the patch. Some people will need the output be exactly as it was before, so they should not apply the patch.
Code:
*** ../../mmff-0.28/src/output.c 2012-10-22 14:00:18.000000000 -0400
--- output.c 2014-06-23 14:20:52.416938792 -0400
***************
*** 438,454 ****
if(factor_number < 10)
{
if(mystuff->mode != MODE_SELFTEST_SHORT)
{
if(mystuff->printmode == 1 && factor_number == 0)printf("\n");
! printf("%s has a factor: %s\n", exponent_string, factor);
}
if(mystuff->mode == MODE_NORMAL)
{
#ifndef MORE_CLASSES
! fprintf(resultfile, "%s%s has a factor: %s [TF:%d:%d%s:mmff %s %s]\n", UID, exponent_string, factor, mystuff->bit_min, mystuff->bit_max_stage, ((mystuff->stopafterfactor == 2) && (mystuff->stats.class_counter < 96)) ? "*" : "" , MFAKTC_VERSION, mystuff->stats.kernelname);
#else
! fprintf(resultfile, "%s%s has a factor: %s [TF:%d:%d%s:mmff %s %s]\n", UID, exponent_string, factor, mystuff->bit_min, mystuff->bit_max_stage, ((mystuff->stopafterfactor == 2) && (mystuff->stats.class_counter < 960)) ? "*" : "" , MFAKTC_VERSION, mystuff->stats.kernelname);
#endif
}
}
--- 438,473 ----
if(factor_number < 10)
{
+ char k[155]; int carry, i, l, N;
+
+ /* SB: don't want to mess with lower functions; I will simply do the k calculation here on a decimal string */
+ /* factors are extremely rare, anyway */
+
+ l = strlen(factor)-1;
+ memcpy(k, factor,l+2);
+ for(N=0; N==0 || (k[l]%2)==0; N++) { /* factor = "k*2^N+1"; disregard last odd digit once */
+ for(i=carry=0; i<=l; i++) {
+ int d = k[i] - '0' + 10 * carry;
+ carry = d & 1;
+ k[i] = d / 2 + '0';
+ }
+ }
+ l++; /* now it is strlen */
+ for(i=0; k[i]=='0'; i++); /* squeeze leading zeroes */
+ if(i) { l -= i; memmove(k, k+i, l); }
+ sprintf(k+l, "*2^%d+1", N);
+
if(mystuff->mode != MODE_SELFTEST_SHORT)
{
if(mystuff->printmode == 1 && factor_number == 0)printf("\n");
! printf("%s has a factor: %s\n", exponent_string, k);
}
if(mystuff->mode == MODE_NORMAL)
{
#ifndef MORE_CLASSES
! fprintf(resultfile, "%s%s has a factor: %s = %s [TF:%d:%d%s:mmff %s %s]\n", UID, exponent_string, k, factor, mystuff->bit_min, mystuff->bit_max_stage, ((mystuff->stopafterfactor == 2) && (mystuff->stats.class_counter < 96)) ? "*" : "" , MFAKTC_VERSION, mystuff->stats.kernelname);
#else
! fprintf(resultfile, "%s%s has a factor: %s = %s [TF:%d:%d%s:mmff %s %s]\n", UID, exponent_string, k, factor, mystuff->bit_min, mystuff->bit_max_stage, ((mystuff->stopafterfactor == 2) && (mystuff->stats.class_counter < 960)) ? "*" : "" , MFAKTC_VERSION, mystuff->stats.kernelname);
#endif
}
}
Last fiddled with by Batalov on 2014-06-23 at 18:30 |
|
|
|
|
|
#322 |
|
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
36·13 Posts |
Attached is the mmff-gfn v.0.28 source. I've tested it thoroughly on all new bit ranges, but let me know if you will encounter errors.
When building the binaries, build five times (after editing Makefile, the row "BASE = ..."), and do 'make clean' between builds. Jerry will probably help us build all Windows binaries as previously. Good hunting to all! |
|
|
|
|
|
#323 | |
|
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
36·13 Posts |
Quote:
I will have to dig deep back into PMs where Xyzzy sent me instructions how to ftp binaries to the site. It's been 2 years - I don't remember any passwords at all. Last fiddled with by Batalov on 2014-06-29 at 00:52 |
|
|
|
|
|
|
#324 |
|
"Jerry"
Nov 2011
Vancouver, WA
100011000112 Posts |
mmff and mmff-gfn 0.28 Windows binaries x86 and x64 posted to:
http://mersenneforum.org/mmff/ and http://mersenneforum.org/mmff-gfn/ Everything is CUDA 6.0, sm_20, 21, 30, 32, 35 and 50. If you need anything else, let me know. Last fiddled with by flashjh on 2014-07-11 at 02:37 |
|
|
|
|
|
#325 |
|
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
36×13 Posts |
Many thanks! ;-)
|
|
|
|
|
|
#326 |
|
"Jerry"
Nov 2011
Vancouver, WA
1,123 Posts |
|
|
|
|
|
|
#327 | |
|
Banned
"Luigi"
Aug 2002
Team Italia
32×5×107 Posts |
Quote:
![]() I will soon update FermatSearch with your executable. Now, only Linux and MAC executables are missing... ![]() Luigi |
|
|
|
|
|
|
#328 |
|
Banned
"Luigi"
Aug 2002
Team Italia
32·5·107 Posts |
New CUDA version, new mmff required.
A friend of us required a mmff version compiled for his GTX 1060 and CUDA 8. I have no Nvidia SDK or boards on my PC at the moment, so I can provide neither Linux nor Windows ones. I hope I will have a Windows version soon (thanks to Jerry). Thank you!! Luigi |
|
|
|
|
|
#330 | |
|
Banned
"Luigi"
Aug 2002
Team Italia
32×5×107 Posts |
Quote:
Last fiddled with by ET_ on 2018-09-30 at 08:19 |
|
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Mersenne trial division implementation | mathPuzzles | Math | 8 | 2017-04-21 07:21 |
| trial division over a factor base | Peter Hackman | Factoring | 7 | 2009-10-26 18:27 |
| P95 trial division strategy | SPWorley | Math | 8 | 2009-08-24 23:26 |
| Trial division software for Mersenne | SPWorley | Factoring | 7 | 2009-08-16 00:23 |
| Need GMP trial-division timings | ewmayer | Factoring | 7 | 2008-12-11 22:12 |