ATAN (The GNU Fortran Compiler)

### 8.25 `ATAN` — Arctangent function ¶

Synopsis:

  `RESULT = ATAN(X)`
  `RESULT = ATAN(Y, X)`

Description:

  `ATAN(X)` computes the arctangent of X.

Class:

  Elemental function

Arguments:

  X | The type shall be `REAL` or `COMPLEX`; if Y is present, X shall be REAL.
  Y | The type and kind type parameter shall be the same as X.

Return value:

  The return value is of the same type and kind as X. If Y is present, the result is identical to `ATAN2(Y,X)`. Otherwise, it is the arctangent of X, where the real part of the result is in radians and lies in the range -\pi/2 \leq \Re \atan(x) \leq \pi/2.

Example:

      program test_atan
        real(8) :: x = 2.866_8
        x = atan(x)
      end program test_atan

Specific names:

  Name | Argument | Return type | Standard
  --- | --- | --- | ---
  `ATAN(X)` | `REAL(4) X` | `REAL(4)` | Fortran 77 and later
  `DATAN(X)` | `REAL(8) X` | `REAL(8)` | Fortran 77 and later

Standard:

  Fortran 77 and later, for a complex argument and for two arguments Fortran 2008 or later

See also:

  Inverse function:
  `TAN` — Tangent function
  Degrees function:
  `ATAND` — Arctangent function, degrees