Double-precision floating point (±1.7E±308, ~15 decimal digits)
1st Parameter
Value between -1 and 1 whose arc cosine is computed
Read more about parameters of acos in parameters section
The acosfunction in C language Calculates the arc cosine of the specified number.
The acos function, also known as the inverse cosine function, takes a number between -1 and 1 and returns the angle whose cosine is equal to that number. The result is given in radians, within the range from 0 to π (0 to 180 degrees). If the input is outside the valid range, the function cannot calculate an angle and instead returns NaN, indicating an invalid result.
The acosfunction takes 1
parameter:
•
double `x`: Value between -1 and 1 whose arc cosine is computed
The acos function return value :
Returns the arc cosine of the input value, in radians, in the range [0, π]
If the input is outside the range [-1, 1], it returns NaN
Output
This example demonstrates the basic usage of the `acos` function with different input values within the valid range.