double atan(double x);
double atan (double x); float atanf (float x);long double atanl (long double x);
double atan (double x); float atan (float x);long double atan (long double x);
double atan (double x); float atan (float x);long double atan (long double x); double atan (T x); // additional overloads for integral types
<cmath> ) for the integral types: These overloads effectively cast x to a double before calculations (defined for T being any integral type ).<complex> and <valarray> (see complex atan and valarray atan).180/PI degrees.1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* atan example */
#include <stdio.h> /* printf */
#include <math.h> /* atan */
#define PI 3.14159265
int main ()
{
double param, result;
param = 1.0;
result = atan (param) * 180 / PI;
printf ("The arc tangent of %f is %f degrees\n", param, result );
return 0;
}
The arc tangent of 1.000000 is 45.000000 degrees.