function
<cmath> <ctgmath>

# atan

```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);
Compute arc tangent
Returns the principal value of the arc tangent of x, expressed in radians.

In trigonometrics, arc tangent is the inverse operation of tangent.

Notice that because of the sign ambiguity, the function cannot determine with certainty in which quadrant the angle falls only by its tangent value. See atan2 for an alternative that takes a fractional argument instead.

Header <tgmath.h> provides a type-generic macro version of this function.
This function is overloaded in `<valarray>` (see valarray atan).
Additional overloads are provided in this header (`<cmath>`) for the integral types: These overloads effectively cast x to a `double` before calculations (defined for T being any integral type).

This function is also overloaded in `<complex>` and `<valarray>` (see complex atan and valarray atan).

### Parameters

x
Value whose arc tangent is computed.

### Return Value

Principal arc tangent of x, in the interval [-pi/2,+pi/2] radians.
One radian is equivalent to `180/PI` degrees.

### Example

 ``1234567891011121314`` ``````/* atan example */ #include /* printf */ #include /* 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; }``````

Output:
 ``` The arc tangent of 1.000000 is 45.000000 degrees. ```