PostgreSQL cosh() 函数使用指南
PostgreSQL cosh() 函数返回指定数值的双曲余弦。
cosh() 语法
这里是 PostgreSQL cosh() 函数的语法:
cosh(number)
参数
number- 必需的。 一个用于计算双曲余弦的数值。
返回值
PostgreSQL cosh() 函数返回指定数值的双曲余弦。
如果参数 number 为 NULL,cosh() 函数将会返回 NULL。
cosh() 示例
这里有几个 cosh() 函数的示例。
SELECT
cosh(-1000) AS "cosh(-1000)",
cosh(-2.5) AS "cosh(-2.5)",
cosh(-0.2) AS "cosh(-0.2)",
cosh(0) AS "cosh(0)",
cosh(0.2) AS "cosh(0.2)",
cosh(2.5) AS "cosh(2.5)",
cosh(1000) AS "cosh(1000)";
-[ RECORD 1 ]------------------
cosh(-1000) | Infinity
cosh(-2.5) | 6.132289479663687
cosh(-0.2) | 1.020066755619076
cosh(0) | 1
cosh(0.2) | 1.020066755619076
cosh(2.5) | 6.132289479663687
cosh(1000) | Infinity