acos

Syntax:

    #include <cmath>
    double acos( double arg );

The acos() function returns the arc cosine of arg, which will be in the range [0, pi]. arg should be between -1 and 1. If arg is outside this range, acos() returns NAN and raises a floating-point exception.

C++ also provides the following overloaded forms:

    #include <cmath>
    float acos( float arg ); // same as acosf() in C99
    long double acos( long double arg ); // same as acosl() in C99

Related Topics: asin, atan, atan2, cos, cosh, sin, sinh, tan, tanh