#include <math.h>
|
|
double
acos (double x); |
|
float
acosf (float x); |
|
long double
acosl (long double x); |
| x | > 1,
The acos, acosf, and acosl functions compute the principal value of the arc cosine of x.
#include <math.h>
int main( )
{
double x = -1;
double y = acos( x );
printf( "acos(%f) = %f\n", x, y );
y = acosf( x );
printf( "acosf(%f) = %f\n", x, y );
y = acosl( x );
printf( "acosl(%f) = %f\n", x, y );
}
Output
acos( -1.000000 ) = 3.14159
acosf(-1.000000 ) = 3.14159
acosl(-1.000000 ) = 3.14159
|
© 2005-2007 Nokia |