Computes the inverse cosine of a given value.
#include <math.h> float acosf (x) float x; long double acosl (x) long double x; double acos (x) double x;
The acosf, acosl, and acos subroutines compute the principal value of the arc cosine of the x parameter. The value of x should be in the range [-1,1].
An application wishing to check for error situations should set the errno global variable to zero and call fetestexcept(FE_ALL_EXCEPT) before calling these functions. On return, if errno is nonzero or fetestexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW) is nonzero, an error has occurred.
x | Specifies the value to be computed. |
Upon successful completion, these subroutines return the arc cosine of x, in the range [0, pi] radians.
For finite values of x not in the range [-1,1], a domain error occurs, and a NaN is returned.
If x is NaN, a NaN is returned.
If x is +1, 0 is returned.
If x is ±Inf, a domain error occurs, and a NaN is returned.
The acosh, acoshf, or acoshl Subroutine.
math.h in AIX 5L Version 5.2 Files Reference.