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
x
equals 0, returns 0 - When
x
equals 1 or -1, returnsNULL
- When
x
is outside the range (-1, 1), returnsNULL
- When
x
is NaN, returns NaN - When
x
is positive or negative infinity, returnsNULL
- When
x
is 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 |
+---------------------------+