Synopsis
#include <math.h>
double acos(double x);
Description

acos returns the principal value, in radians, of the inverse circular cosine of x. The principal value lies in the interval [0, PI] radians.

Fast math library behavior

If |x| > 1, errno is set to EDOM and acos returns HUGE_VAL.

IEC 60559 math library behavior

If x is NaN, acos returns x.
If |x| > 1, acos returns NaN with invalid signal.

Portability

acos conforms to ISO/IEC 9899:1990 (C90) and ISO/IEC 9899:1999 (C99).