exp(@number) [ISO]

This arithmetic predicate calculates the exponential e to it's argument. If an overflow is detected the exception evaluation_error(float_overflow) is thrown.

see also: e/0 arithmetic in Prolog is/2

Examples
X is exp(1.1). succeeds, X is  3.004166
X is exp(-100). an evaluation_error(float_overflow). exception is thrown
X is exp(-10). succeeds, X is 4.539993e-05

 

Exceptions
The result exceeds the floating point range an evaluation_error(float_overflow) exception is thrown

 

 

info@trinc-prolog.com