Lahey/Fujitsu Fortran

TANH Function

Description

The TANH function returns the hyperbolic tangent of a REAL argument.

Syntax

TANH (x)

Arguments

x is an INTENT(IN) scalar or array of type REAL.

Result

The result is of the same type and kind as x. Its value is a REAL representation of the hyperbolic tangent of x.

Example

real :: x..5,y(2)=(/1.,1./) write(*,*) tanh(x) ! writes .4621171 write(*,*) tanh(y) ! writes .7615941 .7615941