TANPI (The GNU Fortran Compiler)

### 8.280 `TANPI` — Circular tangent function ¶

Description:

  `TANPI(X)` computes \tan(\pi x) without performing an explicit multiplication by \pi. This is achieved through argument reduction where |x| = n + r with n an integer and 0 \leq r \le 1. Due to the properties of floating-point arithmetic, the useful range for X is defined by `ABS(X) <= REAL(2,KIND(X))**DIGITS(X)`.

Standard:

  Fortran 2023

Class:

  Elemental function

Syntax:

  `RESULT = TANPI(X)`

Arguments:

  X | The type shall be `REAL`.

Return value:

  The return value is of the same type and kind as X.

Example:

      program test_tanpi
        real :: x = 0.0
        x = tanpi(x)
      end program test_tanpi

See also:

  `ATANPI` — Circular arc tangent function
  `TAN` — Tangent function