acos

Arccosine

double acos (
        double x
)

Arguments

x Argument. Range is [-1 to 1]

Return value

The arccosine of x (acos(x)) is returned. The result range is [0, pi].

Explanation

The arccosine of x is calculated and its value is returned.

Notes

Error processing is shown in the table below:

Condition Return value Error
fabs(x)>1 0 Domain error

See Also

cos(), asin(), atan()