#
Fortran Wiki

tanh

## Description

`tanh(x)`

computes the hyperbolic tangent of `x`

.

## Standard

FORTRAN 77 and later, for a complex argument Fortran 2008 or later

## Class

Elemental function

## Syntax

`x = tanh(x)`

## Arguments

`x`

- The type shall be `real`

or `complex`

.

## Return value

The return value has same type and kind as `x`

. If `x`

is complex, the imaginary part of the result is in radians. If `x`

is `real`

, the return value lies in the range `- 1 \\leq tanh(x) \\leq 1`

.

## Example

```
program test_tanh
real(8) :: x = 2.1_8
x = tanh(x)
end program test_tanh
```

## See also

atanh

Revised on April 4, 2016 17:37:44
by

Jason Blevins
(128.146.137.52)
(851 characters / 0.0 pages)