gmp_legendre
gmp_legendre
Legendre symbol
int **gmp_legendre** $num1 $num2
Compute the
of and
. should be odd
and must be positive.
Legendre symbolnum1``num2``num2
num1``num2Should be odd and must be positive.
gmp.return
Voorbeeld: example
<?php
echo gmp_legendre("1", "3") . "\n";
echo gmp_legendre("2", "3") . "\n";
?>
1
0
gmp_jacobi``gmp_kronecker