The arithmetic comparisons are more flexible than the lexical
comparisons. They are defined for integers, floats and decimals.
For decimals comparison across scales is supported. The same
widening as already defined for the basic operations applies as
1 < 2
1.0 < 2.0
0d1.00D < 2
1 =:= 0d1.00
We also provide evaluable functions min/2 and max/2. These
functions are based on the aforementioned arithmetic comparison.
They always return a value that belongs to the widening type of
min, max: integer x integer -> integer
min, max: float x float -> float
min, max: decimal x decimal -> decimal
The following built-in predicates are provided for arithmetic comparison. The built-ins arithmetically evaluate their arguments before performing their tests:
The following evaluable functions are provided for arithmetic