TAN

Elemental Intrinsic Function (Generic): Produces the tangent of x.

Syntax

result = TAN (x)

x
(Input) Must be of type real or complex. It must be in radians and is treated as modulo 2 * pi.
If x is of type complex, its real part is regarded as a value in radians.

Results

The result type is the same as x.

Specific Name Argument Type Result Type
TAN REAL(4) REAL(4)
DTAN REAL(8) REAL(8)
QTAN REAL(16) REAL(16)
CTAN 1 COMPLEX(4) COMPLEX(4)
CDTAN 2 COMPLEX(8) COMPLEX(8)
CQTAN COMPLEX(16) COMPLEX(16)
1 The setting of compiler options specifying real size can affect CTAN.
2 This function can also be specified as ZTAN.

Examples

TAN (2.0) has the value -2.185040.

TAN (0.8) has the value 1.029639.