--- title: Math.acosh() slug: Web/JavaScript/Reference/Global_Objects/Math/acosh tags: - JavaScript - Math - Method - Reference translation_of: Web/JavaScript/Reference/Global_Objects/Math/acosh ---
Math.acosh() 関数は、数値の双曲線余弦 (ハイパーボリックアークコサイン) を返します。
Math.acosh(x)
x与えられた数値の双曲線余弦 (ハイパーボリックアークコサイン) です。数値が 1 未満であれば、 {{jsxref("NaN")}} になります。
acosh() は Math の静的メソッドであるため、作成した Math オブジェクトのメソッドとしてではなく、常に Math.acosh() として使用するようにしてください (Math はコンストラクターではありません)。
Math.acosh(-1); // NaN Math.acosh(0); // NaN Math.acosh(0.5); // NaN Math.acosh(1); // 0 Math.acosh(2); // 1.3169578969248166
1 未満の値に対しては、 Math.acosh() は {{jsxref("NaN")}} を返します。
に対して、 になり、次の関数でエミュレートできます。
Math.acosh = Math.acosh || function(x) {
return Math.log(x + Math.sqrt(x * x - 1));
};
| 仕様書 |
|---|
| {{SpecName('ESDraft', '#sec-math.acosh', 'Math.acosh')}} |
{{Compat("javascript.builtins.Math.acosh")}}