Artifact d276c0057fae589212da157574c5fdb3f10d73d51b23cd77fc080db0831f3ec9:
- Executable file
r37/lisp/csl/html/r37_0104.html
— part of check-in
[f2fda60abd]
at
2011-09-02 18:13:33
on branch master
— Some historical releases purely for archival purposes
git-svn-id: https://svn.code.sf.net/p/reduce-algebra/code/trunk/historical@1375 2bfe0521-f11c-4a00-b80e-6202646ff360 (user: arthurcnorman@users.sourceforge.net, size: 1291) [annotate] [blame] [check-ins using] [more...]
<A NAME=SETMOD> <TITLE>SETMOD</TITLE></A> <b><a href=r37_idx.html>INDEX</a></b><p><p> <B>SETMOD</B> _ _ _ _ _ _ _ _ _ _ _ _ <B>command</B><P> <P> <P> <P> The <em>setmod</em> command sets the modulus value for subsequent <A HREF=r37_0305.html>modular</A> arithmetic. <P> <H3> syntax: </H3> <P> <P> <em>setmod</em><integer> <P> <P> <P> <integer> must be positive, and greater than 1. It need not be a prime number. <P> <P> <P> <H3> examples: </H3> <P><PRE><TT> setmod 6; 1 on modular; 16; 4 x^2 + 5x + 7; 2 X + 5*X + 1 x/3; X - 3 setmod 2; 6 (x+1)^4; 4 X + 1 x/3; X </TT></PRE><P><em>setmod</em>returns the previous modulus, or 1 if none has been set before. <em>setmod</em> only has effect when <A HREF=r37_0305.html>modular</A> is on. <P> <P> Modular operations are done only on numbers such as coefficients of polynomials, not on the exponents. The modulus need not be prime. Attempts to divide by a power of the modulus produces an error message, since th e operation is equivalent to dividing by 0. However, dividing by a factor of a non-prime modulus does not produce an error message. <P> <P> <P>