メインコンテンツまでスキップ
に最終更新

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