numlib::lincongruence
--
linear congruenceFor integers a
and b
and a nonzero integer
m
numlib::lincongruence
(a,b,m)
returns the sorted list of all solutions of the linear congruence if
this congruence is solvable. Otherwise FAIL
is
returned.
numlib::lincongruence(a, b, m)
a |
- | an integer |
b |
- | an integer |
m |
- | a non-zero integer |
numlib::lincongruence
(a,b,m)
returns a
list of nonnegative integers if a
and b
are
integers and m
is a non-zero integer such that the linear
congruence is solvable.
numlib::lincongruence
(a,b,m)
returns
FAIL
if a
and b
are integers and
m
is a non-zero integer such that the linear congruence
is not solvable.
numlib::lincongruence
(a,b,m)
returns the
function call with its arguments evaluated if one of the arguments is a
symbolic expression.
numlib::ichrem
,
numlib::mroots
,
numlib::msqrts
numlib::lincongruence
(a,b,m)
returns an
error if one of the arguments evaluates to a number of wrong type.A linear congruence possessing one solution:
>> numlib::lincongruence(7,19,23)
[6]
A linear congruence possessing several solutions:
>> numlib::lincongruence(77,209,253)
[6, 29, 52, 75, 98, 121, 144, 167, 190, 213, 236]
A linear congruence possessing no solutions:
>> numlib::lincongruence(77,208,253)
FAIL