COSH
説明
xの双曲線コサインを返します。
構文
COSH(<x>)
パラメータ
| パラメータ | 説明 |
|---|---|
<x> | 双曲線コサインを計算する値 |
戻り値
パラメータxの双曲線コサイン
特殊なケース
xがNaNの場合、NaNを返しますxが正の無限大の場合、Infinityを返しますxが負の無限大の場合、Infinityを返しますxがNULLの場合、NULLを返します
例
select cosh(0);
+-------------------------+
| cosh(cast(0 as DOUBLE)) |
+-------------------------+
| 1.0 |
+-------------------------+
select cosh(1);
+-------------------------+
| cosh(cast(1 as DOUBLE)) |
+-------------------------+
| 1.543080634815244 |
+-------------------------+
select cosh(-1);
+--------------------------+
| cosh(cast(-1 as DOUBLE)) |
+--------------------------+
| 1.543080634815244 |
+--------------------------+
select cosh(cast('nan' as double));
+-----------------------------+
| cosh(cast('nan' AS DOUBLE)) |
+-----------------------------+
| NaN |
+-----------------------------+
select cosh(cast('inf' as double));
+-----------------------------+
| cosh(cast('inf' AS DOUBLE)) |
+-----------------------------+
| Infinity |
+-----------------------------+
select cosh(cast('-inf' as double));
+------------------------------+
| cosh(cast('-inf' AS DOUBLE)) |
+------------------------------+
| Infinity |
+------------------------------+