Math.sinh()
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.sinh()
静的メソッドは、数値の双曲線正弦 (ハイパーボリックサイン) を返します。
試してみましょう
console.log(Math.sinh(0));
// Expected output: 0
console.log(Math.sinh(1));
// Expected output: 1.1752011936438014
console.log(Math.sinh(-1));
// Expected output: -1.1752011936438014
console.log(Math.sinh(2));
// Expected output: 3.626860407847019
構文
js
Math.sinh(x)
引数
x
-
数値です。
返値
x
の双曲線正弦 (ハイパーボリックサイン) です。
解説
sinh()
は Math
の静的メソッドであるため、生成した Math
オブジェクトのメソッドとしてではなく、常に Math.sinh()
として使用するようにしてください (Math
はコンストラクターではありません)。
例
Using Math.sinh() の使用
js
Math.sinh(-Infinity); // -Infinity
Math.sinh(-0); // -0
Math.sinh(0); // 0
Math.sinh(1); // 1.1752011936438014
Math.sinh(Infinity); // Infinity
仕様書
Specification |
---|
ECMAScript® 2025 Language Specification # sec-math.sinh |
ブラウザーの互換性
BCD tables only load in the browser