numlib::mroots -- modular roots
of polynomials
IntroductionFor a univariate polynomial P over the integers and for
a natural number m the function call
numlib::mroots(P,m) returns the sorted list
of all integers such that if such integers exist; otherwise
numlib::mroots(P,m) returns
FAIL.
Call(s)numlib::mroots(P,m)
ParametersP |
- | a univariate polynomial over the integers |
m |
- | a natural number |
Returnsnumlib::mroots returns either a list of nonnegative
integers or FAIL.
Related
Functionsnumlib::lincongruence,
numlib::msqrts
Detailsnumlib::mroots(P,m) returns an error if
P is not a univariate polynomial over the integers or
m is not a natural number.
Example
1Defining a polynomial
>> P := poly(3*T^7 + 2*T^2 + T - 17, [T])
7 2
poly(3 T + 2 T + T - 17, [T])
and computing its roots modulo :
>> numlib::mroots(P, 1751)
[221, 260, 612, 736, 1127, 1496]
The polynomial P does'nt have roots modulo
:
>> numlib::mroots(P, 1994)
FAIL
Backgroundnumlib::mroots uses factor.