4.7.3 Exceptions Related to Arithmetic

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


Nonground expression given.


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.


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


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.