Jacobi/Legendre/Kronecker

Zimmermann Paul Paul.Zimmermann at loria.fr
Mon Dec 17 13:30:49 CET 2012


       Hi,

I wonder why there are some ui/si variants for mpz_kronecker, but not for the
simpler functions mpz_jacobi and mpz_legendre.

Assume one wants to compute the Legendre symbol (A/P) for P an unsigned long
(and A too). What is more efficient?

1) use mpz_kronecker_ui, which forces to convert A to unsigned long

2) use mpz_ui_kronecker, which forces to convert P to unsigned long

3) use mpz_legendre, which forces to convert both A and P to unsigned long

Paul Zimmermann


More information about the gmp-devel mailing list