mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > GMP-ECM

Reply
 
Thread Tools
Old 2009-11-23, 12:53   #1
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

17×353 Posts
Default GMP-ECM Request

I would like to see a feature to disable the PRP testing of the cofactor. This would be used on projects such as the primorial and factorial searches on PrimeGrid. All we want to do is "knock out" the original number from PRP testing if it is composite thus finding a factor is all that we need to do. PRP testing the cofactor adds no value to the project and can actually take longer than that PRP test for the original number (presuming GMP's PRP test is used).
rogue is online now   Reply With Quote
Old 2009-11-23, 13:23   #2
akruppa
 
akruppa's Avatar
 
"Nancy"
Aug 2002
Alexandria

25×7×11 Posts
Default

This can currently be done by configuring with --enable-shellcmd, and specifying a program that always returns true (exit code 0) to the -prpcmd, for example:
ecm -prpcmd /bin/true [...]
That way GMP-ECM thinks the cofactor is prime and stops trying to factor it.

Code:
echo "2^(2^9)+1" | ./ecm -prpcmd /bin/true 1e3
GMP-ECM 6.3 [configured with GMP 4.3.0 and --enable-asm-redc] [ECM]
Input number is 2^(2^9)+1 (155 digits)
Using B1=1000, B2=51606, polynomial x^1, sigma=3861836176
Step 1 took 5ms
Step 2 took 6ms
********** Factor found in step 2: 2424833
Found probable prime factor of  7 digits: 2424833
Probable prime cofactor (2^(2^9)+1)/2424833 has 148 digits
Alex
akruppa is offline   Reply With Quote
Old 2009-11-23, 14:02   #3
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

17×353 Posts
Default

Quote:
Originally Posted by akruppa View Post
This can currently be done by configuring with --enable-shellcmd, and specifying a program that always returns true (exit code 0) to the -prpcmd, for example:
ecm -prpcmd /bin/true [...]
That way GMP-ECM thinks the cofactor is prime and stops trying to factor it.

Code:
echo "2^(2^9)+1" | ./ecm -prpcmd /bin/true 1e3
GMP-ECM 6.3 [configured with GMP 4.3.0 and --enable-asm-redc] [ECM]
Input number is 2^(2^9)+1 (155 digits)
Using B1=1000, B2=51606, polynomial x^1, sigma=3861836176
Step 1 took 5ms
Step 2 took 6ms
********** Factor found in step 2: 2424833
Found probable prime factor of  7 digits: 2424833
Probable prime cofactor (2^(2^9)+1)/2424833 has 148 digits
Alex
I saw that feature, but I was hoping for something simpler that wouldn't require me to rebuild GMP-ECM. It was painful enough to build 64-bit GMP-ECM with gwnum, but that is a different topic.
rogue is online now   Reply With Quote
Old 2009-11-23, 14:37   #4
Jeff Gilchrist
 
Jeff Gilchrist's Avatar
 
Jun 2003
Ottawa, Canada

49116 Posts
Default

Quote:
Originally Posted by rogue View Post
I saw that feature, but I was hoping for something simpler that wouldn't require me to rebuild GMP-ECM. It was painful enough to build 64-bit GMP-ECM with gwnum, but that is a different topic.
If they added a feature to the code to do that, you would still have to rebuild GMP-ECM so either way you have another rebuild coming. The question is do you want to be able to get that functionality now or possibly sometime in the future?
Jeff Gilchrist is offline   Reply With Quote
Old 2009-11-23, 15:07   #5
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

10111011100012 Posts
Default

Quote:
Originally Posted by Jeff Gilchrist View Post
If they added a feature to the code to do that, you would still have to rebuild GMP-ECM so either way you have another rebuild coming. The question is do you want to be able to get that functionality now or possibly sometime in the future?
I can wait for it.
rogue is online now   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Request pinhodecarlos Lounge 3 2017-10-26 18:58
Bug/request Dubslow YAFU 4 2012-03-31 03:07
Odd request? Xyzzy Lounge 23 2011-03-08 17:50
A little request 10metreh Aliquot Sequences 8 2009-10-07 18:13
Request: P-1 79M PageFault Marin's Mersenne-aries 11 2003-11-30 02:47

All times are UTC. The time now is 16:16.

Tue Nov 24 16:16:03 UTC 2020 up 75 days, 13:27, 4 users, load averages: 1.94, 1.85, 1.77

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.