acos()

acos()
Return the arccosine of the argument
Format
acos(cosine)
Parameter
Description
The acos() function returns the arccosine of cosine; that is, the length in
radians of the arc whose cosine is cosine.
The output range for the acos() function is 0 £ acos() £ p. The acos()
function return value is accurate to six decimal places.
Example: Testing for Roundoff Error
The following PSL statements test the roundoff error in the cosine and
arccosine functions by comparing argument with acos(cos(argument)) for 0 £
argument £ 3.1 (»p) radians in increments of 0.1 radian.
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;
}

Parameter Definition
cosine Cosine argument.
Valid Range: –1 £ cosine £ 1