The acos function

Name

acos -- 

Synopsis

#include <math.h>

double acos (double x );

Description

The acos function computes the principal value of the arc cosine of x. A domain error occurs for arguments not in the range [-1, +1].

Returns

The acos function returns the arc cosine in the range [0, pi] radians.

Implementation Notes

For arguments < -1.0, asin returns -pi/2 and sets EDOM.
For arguments > +1.0, asin returns +pi/2 and sets EDOM.