log(@number) [ISO]

This arithmetic predicate calculates the natural logarithm of it's argument.

see also: arithmetic in Prolog is/2 log10

Examples
X is log(0.9). succeeds, X is - 0.1053605
X is log(34.8). succeeds, X is 3.549617

 

Exceptions
The result exceeds the floating point range an evaluation_error(float_overflow) exception is thrown
Value of the argument Arg is equal or less than 0 a domain_error(value, Arg) exception is thrown

 

 

info@trinc-prolog.com