Math.acos()

Signature

double acos (double a)

Domain

action, condition

Description

Returns the arc cosine of an angle, in the range of 0.0 through pi. Special case:
If the argument is NaN or its absolute value is greater than 1, then the result is NaN.
A result must be within 1 ulp of the correctly rounded result. Results must be semi-monotonic.

Parameters

NameTypeDescription
adoubleThe value whose arc cosine is to be returned.

Returns

TypeDescription
doubleThe arc cosine of the argument.

Cautions

none

Example


String result = String.valueOfDouble (Math.acos (0.5));

Result is: result contains: "1.0471975511965979"