ATANH
Description
Returns the hyperbolic arc tangent of x, or NULL if x is not in the range -1 to 1 (excluding -1 and 1).
Syntax
ATANH(<x>)
Parameters
| Parameter | Description | 
|---|---|
| <x> | The value for which the hyperbolic arc tangent is to be calculated | 
Return Value
The hyperbolic arc tangent value of parameter x.
Special Cases
- When xequals 0, returns 0
- When xequals 1 or -1, returnsNULL
- When xis outside the range (-1, 1), returnsNULL
- When xis NaN, returns NaN
- When xis positive or negative infinity, returnsNULL
- When xis NULL, returns NULL
Examples
select atanh(0.0);
+------------+
| atanh(0.0) |
+------------+
|          0 |
+------------+
select atanh(-1.0);
+-------------+
| atanh(-1.0) |
+-------------+
|        NULL |
+-------------+
select atanh(1.0);
+------------+
| atanh(1.0) |
+------------+
|       NULL |
+------------+
select atanh(0.5);
+--------------------+
| atanh(0.5)         |
+--------------------+
| 0.5493061443340548 |
+--------------------+
select atanh(cast('nan' as double));
+---------------------------+
| atanh(cast('nan' AS DOUBLE)) |
+---------------------------+
| NaN                       |
+---------------------------+
select atanh(cast('inf' as double));
+---------------------------+
| atanh(cast('inf' AS DOUBLE)) |
+---------------------------+
| NULL                      |
+---------------------------+