Euclid supports the following operators: % + - * / ^ ! << >> & | XOR ~
Modulus operator: %
Usage: a % b
Evaluates to a modulus b. a must be an integer. b must be a positive integer. LIMITATIONS: operator has not yet been tested on negative a.
Addition operator: +
Usage: a + b
Evaluates to sum of a and b. LIMITATIONS: Currently only valid as a binary operator. The expression "+ b" by itself is not valid.
Subtraction operator: -
Usage: a - b or - b
Can be used as a binary or unary operator.
Multiplication operator: *
Usage: a * b
Evaluates to a multiplied by b.
Division operator: /
Usage: a / b
Evaluates to a divided by b.
Exponentiation operator: ^
Usage: a ^ b
b must currently be a rational number, negative or positive. Irrational exponents are not yet supported.
Factorial operator: !
a must be a positive integer. Returns 1 * 2 * ... * a.
Bitwise shift operators << and >>
Usage: a << b, a >> b
Shift a by b bits left or right. a and b must be integers.
Bitwise logical operators & | XOR ~
Usage: a & b, a | b, a XOR b, ~a
a AND b, a OR b, a XOR b, NOT a, respectively. Note that XOR is case-sensitive.
Copyright © 2003-2006 Kevin L. Gong