On Sat, Oct 16, 2004 at 03:45:18PM +0200, Debian wrote:
> How can I calculate 974^169 mod 28552 in maxima?
>
Use the comand divide. divide(m,n) returns a list whose first
element is the quotient and the second the remainder of the
division m/n. So
(%i1) divide(2^4,10);
(%o1) [1, 6]
(%i2) divide(974^169,28552)[2];
(%o2) 13616
It works with polynomials too
(%i3) divide(x^5-7*x^4+2*x^2+7*x+10, x^2-7);
3 2
(%o3) [x - 7 x + 7 x - 47, 56 x - 319]
However it does not seem to work with Gaussian integers
(%i4) divide(25+6*%i,7+11*%i);
6 233
(%o4) [--, ---]
11 11
it apparently performs the division in the ring of polymomials
with real coefficients
%i14) divide(25+6*x,7+11*x);
6 233
(%o14) [--, ---]
11 11
In general are there commands available for arithmetic in
general Euclidean domains?
> _______________________________________________
> Maxima mailing list
> Maxima@www.math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima