QUOTIENT INDEX

QUOTIENT _ _ _ _ _ _ _ _ _ _ _ _ operator

The quotient 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 reciprocal operator. It is identical to / and slash.

syntax:

quotient(<expression>,<expression>) or <expression> quotient <expression> or quotient(<expression>) or quotient <expression>

<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.

examples:


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

The quotient operator is left associative: a quotient b quotient c is equivalent to (a quotient b) quotient c.

If a matrix argument to the unary quotient is not invertible, or if the second matrix argument to the binary quotient is not invertible, an error message is given.