acos()
Returns the arccosine of the argument.
Syntax
acos(<cosine>)
Parameter
Parameter | Valid values |
---|---|
cosine | -1 ≤ cosine ≤ 1 |
Description
The acos() function returns the arccosine of cosine, that is the length in radians of the arc where the cosine is cosine. The output range for the acos() function is 0 ≤ acos() ≤ p. The return value of the acos() function is accurate to six decimal places.
Example
arg = 0.0;
printf ("radians\t\tcos()\t\tacos(cos())\troundoff error\n");
printf ("-------\t\t-----\t\t-----------\t--------------\n");
while (arg <= 3.1)
{
cosine = cos(arg);
argument = acos(cosine);
error = argument - arg;
printf ("%+1.1f\t\t%+1.6f\t%+1.6f\t%+1.6f\n",arg,cosine,argument,error);
arg = arg + 0.1;
}
printf ("radians\t\tcos()\t\tacos(cos())\troundoff error\n");
printf ("-------\t\t-----\t\t-----------\t--------------\n");
while (arg <= 3.1)
{
cosine = cos(arg);
argument = acos(cosine);
error = argument - arg;
printf ("%+1.1f\t\t%+1.6f\t%+1.6f\t%+1.6f\n",arg,cosine,argument,error);
arg = arg + 0.1;
}
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*