atan Arc cosine, arc sine, and arc tangent functions
Declaration:
Real:
double atan(double x);
double atan2(double y, double x);
Remarks:
atan and atanl calculate the arc tangent of the input value
atan2 and atan2l also calculate the arc tangent of the input value
Return Value:
atan and atanl return the arc tangent of the input value (in the range -pi/2 to pi/2)
atan2 and atan2l return the arc tangent of y/x (in the range -pi to pi).
Program
#include <stdio.h> #include <math.h> int main(void) { double result; double x = 0.5; result = atan(x); printf("The arc tangent of %lf is %lf\n", x, result); return(0); } |
0 comments:
Post a Comment