Next: Comparison and Logical Operators Up: Operators Previous: Define

### Calculate

This table shows operators with one example each for Octave-mode (O-mode) and Maxima-mode (M-mode). Operations are executed according to their precedence (prec), and, if these are equal, in order.
 Function O-Mode M-Mode Prec Order Addition `x + y` `x + y` 4 left-right Subtraction `x - y` `x - y` 4 left-right Scalar Multiplication `x .* y` `x * y` 3 left-right Vector/Matrix Multiplication `x * y` `x . y` 3 left-right Scalar Division `x ./ y` `x / y` 3 left-right Matrix Division (right) `x / y` 3 left-right Matrix Division (left) `x \ y` 3 left-right Scalar Exponentiation `x .^ y` `x ^ y` 1 left-right Vector/Matrix Exponentiation ` x ^ y ` `x ^^ y` 1 left-right Range `x:y:z ` 5 left-right Assignment `x = z ` `x : y` 10 right-left Assignment `x += z` 10 right-left Assignment `x -= z` 10 right-left Assignment `x /= z` 10 right-left Assignment `x *= z` 10 right-left Preincrement `++x` `++x` 10 left-right Predecrement `--x` `--x` 10 left-right Postincrement `x++` `x++` 10 right-left Postdecrement `x--` `x--` 10 right-left Adjunct ` x' ` 1 right-left Factorial `x!` 1 left-right

Next: Comparison and Logical Operators Up: Operators Previous: Define
Helmut Dersch
2009-03-15