TANPI
— Circular tangent function ¶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)
.
Fortran 2023
Elemental function
RESULT = TANPI(X)
X | The type shall be REAL . |
The return value is of the same type and kind as X.
program test_tanpi real :: x = 0.0 x = tanpi(x) end program test_tanpi
ATANPI
— Circular arc tangent function
TAN
— Tangent function