A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Math/cosh below:

Math.cosh() - JavaScript | MDN

Math.cosh()

Baseline Widely available

Math.cosh() 函数返回数值的双曲余弦函数,可用 constant e 表示:

Math.cosh(x) = ex + e - x 2 \mathtt{\operatorname{Math.cosh(x)}} = \frac{e^x + e^{-x}}{2} 语法 参数 描述

由于 cosh() 是 Math 的静态函数,只需通过 Math.cosh() 调用,而不用通过创建 Math 对象来调用。

示例 使用 Math.cosh()

js

Math.cosh(0); // 1
Math.cosh(1); // 1.5430806348152437
Math.cosh(-1); // 1.5430806348152437
规范 浏览器兼容性 参见

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4