up previous next
KroneckerSymbol    --    Kronecker symbol of R mod M


Syntax
KroneckerSymbol(R: INT, M: INT): INT

Description
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.

Example
/**/  KroneckerSymbol(1,3);
1
/**/  KroneckerSymbol(-1,7);
-1

See Also