To view the latest 11.3.x version, see PATROL Agent 11.3.02.

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&#92;t&#92;tcos()&#92;t&#92;tacos(cos())&#92;troundoff error&#92;n");
printf ("-------&#92;t&#92;t-----&#92;t&#92;t-----------&#92;t--------------&#92;n")
while (arg <= 3.1)
{
cosine = cos(arg);
argument = acos(cosine);
error = argument - arg
printf ("%+1.1f&#92;t&#92;t%+1.6f&#92;t%+1.6f&#92;t%+1.6f&#92;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*