FD Expression | Result |
Prolog variable | domain 0..fd_max_integer |
FD variable X | domain of X |
integer number N | domain N..N |
+ E | same as E |
- E | opposite of E |
E1 + E2 | sum of E1 and E2 |
E1 - E2 | subtraction of E2 from E1 |
E1 * E2 | multiplication of E1 by E2 |
E1 / E2 | integer division of E1 by E2 (only
succeeds if the remainder is 0) |
E1 ** E2 | E1 raised to the power of E2
(E1 or E2 must be an integer) |
min(E1,E2) | minimum of E1 and E2 |
max(E1,E2) | maximum of E1 and E2 |
dist(E1,E2) | distance, i.e. |E1 - E2| |
E1 // E2 | quotient of the integer division of E1 by
E2 |
E1 rem E2 | remainder of the integer division of E1 by
E2 |
quot_rem(E1,E2,R) | quotient of the integer division of
E1 by E2
(R is the remainder of the integer division of E1 by E2) |
a sub-expression is of the form _ ** E and E is a variable | instantiation_error | ||
a sub-expression E is neither a variable nor an integer nor an FD arithmetic functor | type_error(fd_evaluable, E) | ||
an expression is too complex | resource_error(too_big_fd_constraint) | ||
X is neither an FD variable nor an integer | type_error(fd_variable, X) | ||