COTAN (The GNU Fortran Compiler)

### 8.83 `COTAN` — Cotangent function ¶

Synopsis:

  `RESULT = COTAN(X)`

Description:

  `COTAN(X)` computes the cotangent of X. Equivalent to `COS(x)` divided by `SIN(x)`, or `1 / TAN(x)`.

  This function is for compatibility only and should be avoided in favor of standard constructs wherever possible.

Class:

  Elemental function

Arguments:

  X | The type shall be `REAL` or `COMPLEX`.

Return value:

  The return value has same type and kind as X, and its value is in radians.

Example:

      program test_cotan
        real(8) :: x = 0.165_8
        x = cotan(x)
      end program test_cotan

Specific names:

  Name | Argument | Return type | Standard
  --- | --- | --- | ---
  `COTAN(X)` | `REAL(4) X` | `REAL(4)` | GNU extension
  `DCOTAN(X)` | `REAL(8) X` | `REAL(8)` | GNU extension

Standard:

  GNU extension, enabled with `-fdec-math`.

See also:

  Converse function:
  `TAN` — Tangent function
  Degrees function:
  `COTAND` — Cotangent function, degrees