double acos (double x);
double acos (double x); float acosf (float x);long double acosl (long double x);
double acos (double x); float acos (float x);long double acos (long double x);
double acos (double x); float acos (float x);long double acos (long double x); double acos (T x); // additional overloads for integral types
<cmath> ) for the integral types: These overloads effectively cast x to a double before calculations (defined for T being any integral type ).<complex> and <valarray> (see complex acos and valarray acos).[-1,+1].180/PI degrees.1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* acos example */
#include <stdio.h> /* printf */
#include <math.h> /* acos */
#define PI 3.14159265
int main ()
{
double param, result;
param = 0.5;
result = acos (param) * 180.0 / PI;
printf ("The arc cosine of %f is %f degrees.\n", param, result);
return 0;
}
The arc cosine of 0.500000 is 60.000000 degrees.