mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   GMP-ECM (https://www.mersenneforum.org/forumdisplay.php?f=55)
-   -   using libecm from python (https://www.mersenneforum.org/showthread.php?t=7923)

yqiang 2007-04-19 22:35

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

akruppa 2007-04-20 08:31

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

Alex

yqiang 2007-04-22 00:14

Aha, I see. Thanks for your clear explanation.

Yi


All times are UTC. The time now is 22:34.

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