mpz_invert (x, 1, 0)

bodrato at mail.dm.unipi.it bodrato at mail.dm.unipi.it
Sun Mar 4 09:13:49 CET 2012


Ciao,

Il Sab, 3 Marzo 2012 7:00 pm, Torbjorn Granlund ha scritto:
> bodrato at mail.dm.unipi.it writes:
>
>   Again, Niels propose an elegant way out: we can let inverses mod 0
>   undefined. To obtain this we can keep the old library code, and patch
...
>   I vote for this option.
>
> Me too.

Done.
I'd like to backport the test and the documentation changes to 5.0, now.

>   What should we do with mpz_powm, and mpz_powm_ui? The code for both
>   functions starts with:
>
>     n = ABSIZ(m);
>     if (n == 0)
>       DIVIDE_BY_ZERO;
>
> Would you want to change that?

It's not necessary. But this is a branch in modular code for a case nobody
uses... You may want to change that :-)

Regards,
m

-- 
http://bodrato.it/papers/



More information about the gmp-devel mailing list