acos


acos

Calculates the inverse cosine of a number

 #include <math.h> double acos ( double x  ); float acosf ( float x  );         (C99) long double acosl ( long double x  );         (C99) 

acos( ) implements the inverse cosine function, commonly called arc cosine. The argument x must be between -1 and 1, inclusive: -1 x 1. If x is outside the functions domainthat is, greater than 1 or less than -1the function incurs a domain error.

The return value is given in radians, and is thus in the range 0 acos(x)

This code produces the following output:

 The pitch of the roof is 30 degrees. 

See Also

The arc cosine functions for complex numbers: cacos( ), cacosf( ), and cacosl( )



C(c) In a Nutshell
C in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596006977
EAN: 2147483647
Year: 2006
Pages: 473

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net