next up previous contents index
Next: Relational Expressions Up: Expressions Previous: Unary Operators

Arithmetic Expressions

    Glish supports the usual arithmetic operations: addition, subtraction, multiplication, division, modulus, and exponentiation. The corresponding operators are +, -, *, /, %, and ^. All work element-by-element given two equal-sized vectors, or pair a scalar with every element in a vector in turn given one scalar and one vector. Arithmetic operators applied to arrays perform the same way as arithmetic operators applied to vectors, but the result is an array instead of a vector. All require numeric operands and yield a numeric result. See § 3.2.3, page gif, for details.

Thu Nov 13 16:44:05 EST 1997