## Atan

### Statement Type

Atan is a mathematical function that operates on REAL arguments.

### Statement Purpose

Atan is Fortran's inverse tangent function. It will return the angle ( in radians ) who's value of tangent equals the value of the argument passed to it.

### Required Arguments

atan (x)

The argument x must be of type REAL. It is the value of the tangent function that the computer will find the corresponding angle of in radians.

### Optional Arguments

There are no optional arguments to this function.

### Results

There are an infinite number of correct answers, so the returned angle is restricted to the range -pi/2 through pi/2. Just keep in mind that the results returned by the function are in radians and not degrees. For instance, the next few lines of code will result in the value of 0.7854078 being stored in the variable angle not 45.0.
```		X= 1.0
angle = atan(x)
```
If you need angle to be in degrees, you will have to convert using something like the following.
```		pi=3.14159265
angle=angle*(180.0/pi)
```

lecture seven

examples:

## Up one level / Home

Written by Jason Wehr : jcw142@psu.edu and Maintained by John Mahaffy : jhm@cac.psu.edu