Is mpz_legendre defined for p=2?
Mon, 24 Feb 2003 08:30:43 +1000
"Andrew Friedley (CNS Student Support)" <email@example.com> writes:
> Looking at the information on mpz_legendre() in the manual, it claims
> that it is only defined for p being an odd positive prime.
True, that's the definition for the legendre symbol.
> I have tried
> using mpz_legendre() with p=2 and it seems to work as expected, is this
In the current implementation mpz_legendre, mpz_jacobi and
mpz_kronecker are all aliases for the one function (the kronecker
So calling mpz_legendre with inputs outside its documented range
works, though of course if you really want an even denominator then
you should be calling mpz_kronecker, for which such things are