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 for BMC Helix Operations Management 24.3.01.

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*