|
| atan| Summary | |
#include <math.h>
float atan (
float x); /* number to calculate arc tangent of */
| | Description | | The atan function calculates the arc tangent of the floating-point number x. The floating-point value returned by atan is a number in the -π/2 to π/2 range. | | Return Value | | The atan function returns the arc tangent of x. | | See Also | | acos, asin, atan2 | | Example | |
#include <math.h>
#include <stdio.h> /* for printf */
void tst_atan (void) {
float x;
float y;
for (x = -10.0; x <= 10.0; x += 0.1) {
y = atan (x);
printf ("ATAN(%f) = %f\n", x, y);
}
}
|
|
|