mersenneforum.org  

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

Reply
 
Thread Tools
Old 2007-04-19, 22:35   #1
yqiang
 
Apr 2007

112 Posts
Default using libecm from python

Hello,
I am writing a wrapper for ecm using python and pyrex. I have successfully wrapped the ecm_factor method defined in ecm.h but am a bit confused about the factors it sometimes finds.

If I call ecm_factor(f, n, B1, NULL), the factor it finds is sometimes equal to n. I thought it was supposed to return you a nontrivial factor.

Cheers,
Yi
yqiang is offline   Reply With Quote
Old 2007-04-20, 08:31   #2
akruppa
 
akruppa's Avatar
 
"Nancy"
Aug 2002
Alexandria

2,467 Posts
Default

It depends on the parameters. Bad sigma values can cause the trivial factor N to be found, specifically sigma=0,1,2,3 and 5, afaik. Also, if all prime factors in N are relatively small and your B1 value is high enough, ECM can find all factors simultaneously and hence return N as the factor.

Alex
akruppa is offline   Reply With Quote
Old 2007-04-22, 00:14   #3
yqiang
 
Apr 2007

3 Posts
Default

Aha, I see. Thanks for your clear explanation.

Yi
yqiang is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP vs. Python vs. C (all with GMP) daxmick Programming 2 2014-02-10 01:45
Python... Xyzzy Programming 20 2009-09-08 15:51
Is libecm thread-safe? frmky GMP-ECM 5 2009-02-28 16:08
Can't bind libecm.a with C++ files poire GMP-ECM 2 2006-03-21 14:41
Help w/ python. a216vcti Programming 7 2005-10-30 00:37

All times are UTC. The time now is 17:28.

Fri Sep 18 17:28:34 UTC 2020 up 8 days, 14:39, 1 user, load averages: 2.08, 1.75, 1.66

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.