Next: , Previous: , Up: ref-ari   [Contents][Index]


4.7.3 Exceptions Related to Arithmetic

All predicates that evaluate arithmetic expressions will raise the following exceptions:

instantiation_error

Nonground expression given.

type_error

Float given where integer required, or integer given where float is required, or term given as expression with a principal functor that is not a defined function.

evaluation_error

Function undefined for the given argument. For example, attempt to divide by zero.

representation_error

Integer value too large to be represented.

The reference page for such predicates will simply refer to these as “Arithmetic errors” and will go on to detail other exceptions that may be raised for a particular predicate.


Send feedback on this subject.