C Tutorial/math.h/acos
Версия от 14:21, 25 мая 2010; (обсуждение)
acos
Item Value Header file math.h Declaration float acosf(float arg);double acos(double arg);long double acosl(long double arg); Return The acos() returns the arc cosine of arg. Parameter The argument must be in the range -1 to 1.
#include <math.h>
#include <stdio.h>
int main(void)
{
double val = -1.0;
do {
printf("Arc cosine of %f is %f.\n", val, acos(val));
val += 0.1;
} while(val<=1.0);
return 0;
}