COSD (The GNU Fortran Compiler)

### 8.78 `COSD` — Cosine function, degrees ¶

Synopsis:

  `RESULT = COSD(X)`

Description:

  `COSD(X)` computes the cosine of X in degrees.

Class:

  Elemental function

Arguments:

  X | The type shall be `REAL`.

Return value:

  The return value is of the same type and kind as X and lies in the range -1 \leq \cosd (x) \leq 1.

Example:

      program test_cosd
        real :: x = 0.0
        x = cosd(x)
      end program test_cosd

Specific names:

  Name | Argument | Return type | Standard
  --- | --- | --- | ---
  `COSD(X)` | `REAL(4) X` | `REAL(4)` | Fortran 2023
  `DCOSD(X)` | `REAL(8) X` | `REAL(8)` | GNU extension
  `CCOSD(X)` | `COMPLEX(4) X` | `COMPLEX(4)` | GNU extension
  `ZCOSD(X)` | `COMPLEX(8) X` | `COMPLEX(8)` | GNU extension
  `CDCOSD(X)` | `COMPLEX(8) X` | `COMPLEX(8)` | GNU extension

Standard:

  Fortran 2023

See also:

  Inverse function:
  `ACOSD` — Arccosine function, degrees
  Radians function:
  `COS` — Cosine function