C acos() Function

Last Updated:

C acos()

The acos() function returns the arc-cosine of the given number.

This function is defined in <math.h> header file.


C Compiler
#include <stdio.h> #include <math.h> int main() { printf("%lf", acos(0.5)); return 0; }


acos(data_type x)

Parameter Values

x Required Specifies a floating point value in the interval [-1, +1].

Return Value

Number The arc-cosine of the given number.
The return value will be between 0 and π, if the given value is between -1 and 1.
The return value is represented in radians.
NaN If the given value is not between -1 and 1.

Share this Page

Meet the Author