numlib::mroots
-- modular roots
of polynomialsFor 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
.
numlib::mroots(P,m)
P |
- | a univariate polynomial over the integers |
m |
- | a natural number |
numlib::mroots
returns either a list of nonnegative
integers or FAIL
.
numlib::lincongruence
,
numlib::msqrts
numlib::mroots
(P,m)
returns an error if
P
is not a univariate polynomial over the integers or
m
is not a natural number.Defining 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
numlib::mroots
uses factor
.