numlib::jacobi -- Jacobi
symbol
Introductionnumlib::jacobi(a,m) returns the Jacobi
symbol (a|m).
Call(s)numlib::jacobi(a, m)
Parametersa |
- | an integer |
m |
- | an odd positive integer |
Returnsnumlib::jacobi(a,m) returns a nonnegative
integer, or the function call with evaluated arguments if one of the
arguments is not a number.
Related
Functionsnumlib::legendre,
numlib::isquadres
Detailsnumlib::jacobi returns an error if one of its
arguments evaluates to a number of wrong type.
Example
1Computing the Jacobi symbol :
>> numlib::jacobi(222222, 304679)
-1
Example
2Computing the Jacobi-Symbol :
>> numlib::jacobi(222222, 324899)
1
Example
3Computing the Jacobi symbol :
>> numlib::jacobi(222222, 333333)
0
Backgroundnumlib::jacobi doesn't use ifactor.