C Reference function acos()
Usage of acos():
double acos(double x);
Parameters:
The value x must be within the range of -1 to +1 (inclusive).
Return value:
The returned value is in the range of 0 to pi (inclusive).
Source code example of acos():
#include<stdio.h>
#include<math.h>
#define PI 3.14159265
main()
{
double input, output;
input = 0.8;
output = acos (input) * 180.0 / PI;
printf ("Arc cosine of %lf is %lf degrees.\n", input, output );
return 0;
}
Output of the acos example program above:
Arc cosine of 0.800000 is 36.869898 degrees.
This entry was posted in C Reference math.h Functions.
You can follow any responses to this entry through the RSS 2.0 feed.
Both comments and pings are currently closed.
Tweet This! or use
to share this post with others.