cosh
Computes the hyperbolic cosine of the argument.
This function is supported from v3.0.
Syntaxβ
DOUBLE cosh(DOUBLE arg)
Parametersβ
arg
: You can specify only a numeric value. This function converts the numeric value into a DOUBLE value before it computes the hyperbolic cosine of the value.
Return valueβ
Returns a value of the DOUBLE data type.
Usage notesβ
If you specify a non-numeric value, this function returns NULL
.
Examplesβ
mysql> select cosh(-1);
+--------------------+
| cosh(-1) |
+--------------------+
| 1.5430806348152437 |
+--------------------+
mysql> select cosh(0);
+---------+
| cosh(0) |
+---------+
| 1 |
+---------+
mysql> select cosh(1);
+--------------------+
| cosh(1) |
+--------------------+
| 1.5430806348152437 |
+--------------------+
mysql> select cosh("");
+----------+
| cosh('') |
+----------+
| NULL |
+----------+
keywordβ
COSH