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
x
equals 1, returns 0 - When
x
is less than 1, returnsNULL
- When
x
is NaN, returns NaN - When
x
is positive infinity, returns Infinity - When
x
is negative infinity, returnsNULL
- When
x
is 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 |
+-------------------+