#
Fortran Wiki

tanh

## Description

`tanh(x)`

computes the hyperbolic tangent of `x`

.

## Standard

FORTRAN 77 and later

## Class

Elemental function

## Syntax

`x = tanh(x)`

## Arguments

`x`

- The type shall be `real`

.

## Return value

The return value is of type `real`

and lies in the range $-1\le \mathrm{tanh}(x)\le 1$.

## Example

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

## See also

atanh

Revised on April 30, 2009 17:33:11
by

Jason Blevins
(71.70.142.190)
(484 characters / 0.0 pages)