Skip to main content

ACOSH

Description

Returns the hyperbolic arc cosine of x, or NULL if x is less than 1.

Syntax

ACOSH(<x>)

Parameters

ParameterDescription
<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, returns NULL
  • When x is NaN, returns NaN
  • When x is positive infinity, returns Infinity
  • When x is negative infinity, returns NULL
  • 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 |
+-------------------+