Re: mini-gmp mpz_gcdext Bézout coefficients do not match documentation
marco.bodrato at tutanota.com
marco.bodrato at tutanota.com
Sat Feb 17 20:06:06 CET 2024
Ciao,
17 feb 2024, 19:15 da :
> Ciao Niels,
>
> 17 feb 2024, 17:53 da nisse at lysator.liu.se:
>
>> Niels Möller <nisse at lysator.liu.se> writes:
>> The documented conditions say that gmp should return the same cofactors
>>
>
> The documentation also says "If abs(a) = abs(b), then s = 0, t = sgn(b)."
>
Maybe we should also add the test:
/* Require that s==0 iff g==abs(b) */
if (!mpz_sgn (s) ^ !mpz_cmpabs (g, b))
goto fail;
Ĝis,
m
More information about the gmp-bugs
mailing list