# acos() in c – acos C Library Function

acos() in c: The function double acos(double x); returns the arc cosine of x, expressed in radians. Arc cosine is the inverse operation of cosine, It is also known as cosine inverse.

### Function prototype of acos

double acos(double x);

• x : A floating point value whose arc cosine(inverse cosine) to be computed, in the interval [-1, 1] (including -1 and 1).

### Return value of acos

Inverse cosine java: Function acos returns the principal arc cosine of x, in the interval [0, PI] radians.

### C program using acos function

The following program shows the use of acos function to calculate inverse of cosine.

#include <stdio.h>
#include <math.h>

#define PI 3.14159

int main(){
/* Range of cosine function is from -1 to 1*/
printf("Enter a floating number between -1 and 1\n");
scanf("%lf", &input);

/*
*  One radian is equal to 180/PI degrees.
*/

printf("The arc cosine of %0.4lf is %0.4lf in radian\n",
}
Enter a floating number between -1 and 1
The arc cosine of 0.5000 is 60.0001 in degree