[Ecm-discuss] Need assist with an ECM-GMP program.

Georg-Johann Lay avr at gjlay.de
Ven 20 Mar 17:21:02 CET 2020


Am 20.03.20 um 16:17 schrieb paul zimmermann:
>> 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?
>>
>> There is
>>
>> #define ECM_FACTOR_FOUND_P(x) ((x) > 0)
>>
>> in ecm.h so "FACTOR" includes the trivial ones?
> 
> this is deliberate, when n = 1 we consider n is fully factored:
> 
>    else if (mpz_cmp_ui (n, 1) == 0)
>      {
>        mpz_set_ui (f, 1);
>        return ECM_FACTOR_FOUND_STEP1;
>      }
> 
> Best regards,
> Paul


I am getting f = 1 or f = n and res > 0 from ecm_factor with composite n.

Is there any conclusion from this, e.g. B1 was just too big or so?

Johann




Plus d'informations sur la liste de diffusion Ecm-discuss