--- title: Math.sinh() slug: Web/JavaScript/Reference/Global_Objects/Math/sinh tags: - ECMAScript 2015 - JavaScript - Math - Method - Reference translation_of: Web/JavaScript/Reference/Global_Objects/Math/sinh ---
Math.sinh() 関数は、引数として与えた数の双曲線正弦 (ハイパーボリックサイン) を返します。これは{{jsxref("Math.E", "定数 e", "", 1)}} を使用して次のように表すことができます。
Math.sinh(x)
x指定された数値の双曲線正弦 (ハイパーボリックサイン) です。
sinh() は Math の静的メソッドであるため、生成した Math オブジェクトのメソッドとしてではなく、常に Math.sinh() として使用するようにしてください (Math はコンストラクターではありません)。
これは {{jsxref("Math.exp()")}} 関数を使用して次のようにエミュレートできます。
Math.sinh = Math.sinh || function(x) {
return (Math.exp(x) - Math.exp(-x)) / 2;
}
または {{jsxref("Math.exp()")}} 関数を一度だけ呼び出すようにすると、次のようになります。
Math.sinh = Math.sinh || function(x) {
var y = Math.exp(x);
return (y - 1 / y) / 2;
}
Math.sinh(0); // 0 Math.sinh(1); // 1.1752011936438014
| 仕様書 |
|---|
| {{SpecName('ESDraft', '#sec-math.sinh', 'Math.sinh')}} |
{{Compat("javascript.builtins.Math.sinh")}}