The acos() function (which stands for arc cosine) is defined in math.h. It accepts a variable, returns the arc cosine value of the variable. This function expects the values in the range of -1 to 1 and values are returned in the range 0 to PI (3.1415927). It prints NAN if a value greater than 1 is passed.

Syntax edit

float acos(float x);

Parameters edit

Floating point value whose arc cosine value has to be returned.

Returns edit

Floating point value (arc cosine value of variable).

References edit

  • The C Programming Language, Second Edition, By Brian W. Kernighan and Dennis M. Ritchie, Page no. 251
  • Programming With C, Second Edition, By Gottfried, Page no 487

External Links edit