Acos Function


  • It is used for getting the Arc Cosine value of the argument .
  • The value of the argument should be in between -1 and 1 .

  • Syntax:

    float acosf(float arg);
    
    double acos(double arg);
    
    long double acosl(long double arg);


    Example:

    #include <math.h>#include <stdio.h>
    
      int main()
      {
        double x = -1.0;
        do {
          printf("Arc Cosine of %f is %f.\n", x, acos(x));
          x += 0.1;
           } while(x<=1.0);
           
        return 0;
      }
    
    Back