-   GMP-ECM (
-   -   using libecm from python (

yqiang 2007-04-19 22:35

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.


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.


yqiang 2007-04-22 00:14

Aha, I see. Thanks for your clear explanation.


All times are UTC. The time now is 14:25.

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