up previous next
KroneckerSymbol --
Kronecker symbol of R mod M
|
KroneckerSymbol(R: INT, M: INT): INT |
This function returns the kronecker symbol of
R modulo
M.
If
M is prime then this value is 0 when
R is divisible
by
M, and otherwise is 1 when
R is a square modulo
M (i.e. a quadratic reside), and -1 when it is not a square.
/**/ KroneckerSymbol(1,3);
1
/**/ KroneckerSymbol(-1,7);
-1
|