The syntax for integer expressions in Macaulay is similar to most computer languages, except that no blank spaces are allowed inside of such an expression, since spaces are used as delimiters in Macaulay.
The legal operators of Macaulay, in order of increasing precedence, are given in the following table.
^, ** (both are exponentiation operators)
Parentheses are used to enforce groupings in an expression. User defined variables which are integers may appear in expressions.
The relational operators all return the value one if the condition is true, else they return zero.
For example, using the int command,
% int i (3+1)/2+(4-1)^2 % type i ; 11 % int a (i+3)*(i+2)*(i+1)/6 % type a ; 364 % int b i>a % type b ; 0 % int b i<a % type b ; 1