Change language to:
Français - 日本語 - Português - Русский

See the recommended documentation of this function

# atanh

hyperbolic tangent inverse

### Syntax

`t = atanh(x)`

### Arguments

x, t

Arrays of real or complex numbers, of same sizes.

### Description

The components of vector `t` are the hyperbolic tangent inverse of the corresponding entries of vector `x`. The result `t` is real for `x` in `[-1,1]`, and complex otherwise.

### Examples

With input real numbers:

```x = [-%inf -2 -1 -0.5 0 0.5 1 2 3 %inf];
[x ; atanh(tanh(x))]
atanh(x')```
```--> [x ; atanh(tanh(x))]
ans  =
-Inf  -2.  -1.  -0.5   0.   0.5   1.   2.   3.   Inf
-Inf  -2.  -1.  -0.5   0.   0.5   1.   2.   3.   Inf

--> atanh(x')
ans  =
0.        + 1.5707963i
-0.5493061 + 1.5707963i
-Inf       + 0.i
-0.5493061 + 0.i
0.        + 0.i
0.5493061 + 0.i
Inf       + 0.i
0.5493061 + 1.5707963i
0.3465736 + 1.5707963i
0.        + 1.5707963i
```

With input complex numbers:

```x = [-1-%i, -%i, 0, %i, %i+1];
[x; tanh(atanh(x)) ; atanh(tanh(x))]
atanh(x.')```
```--> [x; tanh(atanh(x)) ; atanh(tanh(x))]
ans  =

-1. - i     0. - i     0. + 0.i   0. + i     1. + i
-1. - i     0. - i     0. + 0.i   0. + i     1. + i
-1. - i     0. - i     0. + 0.i   0. + i     1. + i

--> atanh(x.')
ans  =

-0.4023595 - 1.017222i
0.        - 0.7853982i
0.        + 0.i
0.        + 0.7853982i
0.4023595 + 1.017222i
```

 Version Description 6.0 `atanh(-1)` is now always `-Inf`, and `atanh(1)` always `Inf`. For any real x>1, imag(atanh(x)) is now > 0.