acos(@number)

This arithmetic predicate calculates the arc cosines of the argument. This predicate is not in the ISO Prolog standard.

see also: atan/1 arithmetic in Prolog cos/1 cosh/1 is/2 sin/1 sinh/1 tan/1 tanh/1

Examples
X is acos(1.1). a domain_error(value, acos(1.1)) exception is thrown
X is acos(-0.1). succeeds, X is 1.670964

 

Exceptions
Number is smaller than -1.0 or larger than +1.0 a domain_error(value, A) exception is thrown, A is replaced by the expression that causes the overflow, for example: acos(1.1)
The result exceeds the floating point range an evaluation_error(float_overflow) exception is thrown

 

 

info@trinc-prolog.com