Arithmetic

Flora has built-in infix functions for the usual arithmetic operations. The \is operator is used to calculate the value of an arithmetic expression and assign it to a variable. For example:

?x \is (3 + ?y)

Note that all the variables in the expression (?y in this case) have to be ground (i.e., have a value) by the time the \is expression is evaluated. Otherwise, Flora will signal an error.

For a more flexible approach to mathematical expressions, see CLP(R) math.