Go Back > Factoring Projects > GMP-ECM

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

112 Posts
Default using libecm from python

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.

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

2,467 Posts

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.

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

3 Posts

Aha, I see. Thanks for your clear explanation.

yqiang is offline   Reply With Quote

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.