[Ecm-discuss] Need assist with an ECM-GMP program.
avr at gjlay.de
Ven 20 Mar 15:32:32 CET 2020
Am 20.03.20 um 14:19 schrieb paul zimmermann:
> Dear Georg-Johann,
> it appears that ep->sigma, which is initially 0 (un-initialized) is set
> by ecm_factor, and then if the first call fails, since now ep->sigma is
> non-zero, it is taken as the sigma value, and it fails again and again.
> With mpz_set_ui (ep->sigma, 0) after the ecm_factor() call it works better,
> but there still seems to be a problem.
Tried that, but it did not help.
What helps though is to use a fresh ecm_params for each ecm_factor call.
It this supposed to be the case? I did not find a documentation of
ecm_init() / ecm_clear() and used them similar to respective mpz_*
functions, i.e. init once at start of program and clear at the end.
Appeared to be reasonable as they are using malloc / free...
One more question:
I am getting return values > 0 from ecm_factor() where is sets the 1st
operand to 1. Of course 1 is technically a factor of the input, but
I expected return value > 0 to mean "nontrivial factor", no?
#define ECM_FACTOR_FOUND_P(x) ((x) > 0)
in ecm.h so "FACTOR" includes the trivial ones?
Plus d'informations sur la liste de diffusion Ecm-discuss