Math.acosh()
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
Math.acosh()
は静的メソッドで、数値の双曲線余弦(ハイパーボリックアークコサイン)を返します。
試してみましょう
console.log(Math.acosh(0.999999999999));
// Expected output: NaN
console.log(Math.acosh(1));
// Expected output: 0
console.log(Math.acosh(2));
// Expected output: 1.3169578969248166
console.log(Math.acosh(2.5));
// Expected output: 1.566799236972411
構文
js
Math.acosh(x)
引数
x
-
1 以上の数値です。
返値
与えられた数値の双曲線余弦 (ハイパーボリックアークコサイン) です。数値が 1 未満であれば、 NaN
になります。
解説
acosh()
は Math
の静的メソッドであるため、作成した Math
オブジェクトのメソッドとしてではなく、常に Math.acosh()
として使用するようにしてください (Math
はコンストラクターではありません)。
例
Math.acosh() の使用
js
Math.acosh(0); // NaN
Math.acosh(1); // 0
Math.acosh(2); // 1.3169578969248166
Math.acosh(Infinity); // 無限大
仕様書
Specification |
---|
ECMAScript® 2025 Language Specification # sec-math.acosh |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
acosh |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.