跳到主要内容
版本: 最新版本-3.5

cosh (双曲余弦)

Computes the hyperbolic cosine of the argument. (计算参数的双曲余弦值。)

此函数从 v3.0 版本开始支持。

语法

DOUBLE cosh(DOUBLE arg)

参数

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. (arg: 只能指定数值。此函数在计算该值的双曲余弦之前将数值转换为 DOUBLE 值。)

返回值

返回 DOUBLE 数据类型的值。

使用说明

如果指定非数值,则此函数返回 NULL

示例

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 |
+----------+

关键词

COSH