Artifact 222aec016e5083fddbb8969a951718aa9f9fbec74db4dd14112a537223610313:
- Executable file
r37/lisp/csl/html/r37_0098.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: 2017) [annotate] [blame] [check-ins using] [more...]
<A NAME=QUOTIENT> <TITLE>QUOTIENT</TITLE></A> <b><a href=r37_idx.html>INDEX</a></b><p><p> <B>QUOTIENT</B> _ _ _ _ _ _ _ _ _ _ _ _ <B>operator</B><P> <P> The <em>quotient</em> operator is both an infix and prefix binary operator that returns the quotient of its first argument divided by its second. It is also a unary <A HREF=r37_0101.html>recip</A>rocal operator. It is identical to <em>/</em> and <A HREF=r37_0030.html>slash</A>. <P> <H3> syntax: </H3> <P> <P> <em>quotient</em>(<expression>,<expression>) or <expression> <em>quotient</em> <expression> or <em>quotient</em>(<expression>) or <em>quotient</em> <expression> <P> <P> <P> <expression> can be any valid REDUCE scalar expression. Matrix expressions can also be used if the second expression is invertible and the matrices are of the correct dimensions. <P> <H3> examples: </H3> <P><PRE><TT> quotient(a,x+1); A ----- X + 1 7 quotient 17; 7 -- 17 on rounded; 4.5 quotient 2; 2.25 quotient(x**2 + 3*x + 2,x+1); X + 2 matrix m,inverse; m := mat((a,b),(c,d)); M(1,1) := A; M(1,2) := B; M(2,1) := C M(2,2) := D inverse := quotient m; D INVERSE(1,1) := ---------- A*D - B*C B INVERSE(1,2) := - ---------- A*D - B*C C INVERSE(2,1) := - ---------- A*D - B*C A INVERSE(2,2) := ---------- A*D - B*C </TT></PRE><P><P> <P> The <em>quotient</em> operator is left associative: <em>a quotient b quotient c </em> is equivalent to <em>(a quotient b) quotient c</em>. <P> <P> If a matrix argument to the unary <em>quotient</em> is not invertible, or if the second matrix argument to the binary quotient is not invertible, an error message is given. <P> <P> <P>