ACOSH
Description
Returns the hyperbolic arc cosine of x, or NULL if x is less than 1.
Syntax
ACOSH(<x>)
Parameters
| Parameter | Description |
|---|---|
<x> | The value for which the hyperbolic arc cosine is to be calculated |
Return Value
The hyperbolic arc cosine value of parameter x.
Special Cases
- When
xequals 1, returns 0 - When
xis less than 1, returnsNULL - When
xis NaN, returns NaN - When
xis positive infinity, returns Infinity - When
xis negative infinity, returnsNULL - When
xis NULL, returns NULL
Examples
select acosh(0.0);
+------------+
| acosh(0.0) |
+------------+
| NULL |
+------------+
select acosh(-1.0);
+-------------+
| acosh(-1.0) |
+-------------+
| NULL |
+-------------+
select acosh(1.0);
+------------+
| acosh(1.0) |
+------------+
| 0 |
+------------+
select acosh(1.0000001);
+-------------------------+
| acosh(1.0000001) |
+-------------------------+
| 0.0004472135918947727 |
+-------------------------+
select acosh(cast('nan' as double));
+----------------------------+
| acosh(cast('nan' AS DOUBLE)) |
+----------------------------+
| NaN |
+----------------------------+
select acosh(cast('inf' as double));
+----------------------------+
| acosh(cast('inf' AS DOUBLE)) |
+----------------------------+
| Infinity |
+----------------------------+
select acosh(10.0);
+-------------------+
| acosh(10.0) |
+-------------------+
| 2.993222846126381 |
+-------------------+