This library provides basic predicates for arithmetic comparison and arithmetic evaluation.
The general arithmetic predicates all handle expressions. An expression is either a number or a function. The arguments of a function are expressions. FASILL defines the following numeric types:
integer
: depending on the Prolog system on which FASILL is executed, integers can be bounded or not. The type of integer support can be detected using the FASILL flags bounded
, min_integer
and max_integer
.
float
: floating point numbers. On most of today's platforms these are 64-bit IEEE floating point numbers.
This predicate succeeds when Result is the result of evaluating the expression Expression. This predicate throws an arithmetical exception if there is any problem.
This predicate succeeds when expressions Expression1 and Expression2, evaluated as much as possible, fulfill the ordering relation Op.
This predicate succeeds when Number has the type Type (`integer` or `float`).
This predicate succeeds when Result is the result of evaluating the operator Operator with the arguments Arguments with types Types.