[ Arithmetic | The ECLiPSe Built-In Predicates | Reference Manual | Alphabetic Index ]
+Expr1 < +Expr2
Succeed if the value of Expr1 is less than the value of Expr2.
- +Expr1
- An arithmetic expression
- +Expr2
- An arithmetic expression
Description
Both arguments are evaluated and their types adjusted. Then the
resulting numbers are compared. The predicate succeeds if the value of
Expr1 is less than the value of Expr2. If the system is in coroutining
mode and the arguments are not ground, this predicate delays until the
expressions are fully instantiated.
The predicate also delays when the comparison involves bounded reals,
and the compared values overlap such that the result is undecidable.
Fail Conditions
Fails if the value of Expr1 is greater than or equal to the value of
Expr2.
Resatisfiable
No
Exceptions
- (4) instantiation fault
- Expr1 or Expr2 is a variable (non-coroutining mode only).
- (5) type error
- Expr1 or Expr2 is not an arithmetic expression.
Examples
Success:
5 - 3 < 6 / 2.
0 < sin(pi/4). % 0 converted to 0.0
Fail:
2 + 4 < 2 * 3.
Error:
_ < 10. (Error 4)
"s" < 10. (Error 5)
See Also
suspend : < / 2, ria : < / 2, ic : < / 2, is / 2, =:= / 2, =\= / 2, >= / 2, =< / 2, > / 2