Important

   

This documentation space contains information about PATROL Agents when deployed in a TrueSight Operations Management environment. If you are a BMC Helix Operations Management user, see PATROL Agent 22.1 for BMC Helix Operations Management. Open link

acos()

Returns the arccosine of the argument.

Syntax

acos(<cosine>)

Parameter

ParameterValid 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;
}

Was this page helpful? Yes No Submitting... Thank you

Comments