Niels Möller nisse at lysator.liu.se
Mon Dec 17 17:46:31 CET 2012

Zimmermann Paul <Paul.Zimmermann at loria.fr> writes:

> this is strange, since from the documentation mpz_jacobi(A,15) should work
> but mpz_legendre(A,15) should be undefined. If no check is done at all, I
> do not see why there are 3 different functions.

To me, it would make sense to have only mpz_kronecker, and mention
legendre and jacobi in the documentation (at least if we're talking
about the mpz functions). That seems to be what pari/gp does.

Except if there's some range (but I'm not aware of any) where
mpz_legendre could be implemented more efficiently, e.g., via modular


Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.

More information about the gmp-devel mailing list