Add missing tanh function

This commit is contained in:
Shaun Struwig 2024-04-12 16:25:23 +02:00 committed by GitHub
parent dbc04c84dc
commit 74453c384f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -557,6 +557,37 @@ Result:
│ 0 │
└──────────┘
```
## tanh
Returns the [hyperbolic tangent](https://www.mathworks.com/help/matlab/ref/tanh.html).
**Syntax**
``` sql
tanh(x)
```
**Arguments**
- `x` — The angle, in radians. Values from the interval: `-∞ < x < +∞`. [Float64](../../sql-reference/data-types/float.md#float32-float64).
**Returned value**
- Values from the interval: `-1 < tanh(x) < 1`.
Type: [Float64](../../sql-reference/data-types/float.md#float32-float64).
**Example**
``` sql
SELECT tanh(0);
```
Result:
```result
0
```
## atanh