A RetroSearch Logo

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

Search Query:

Showing content from https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Math/atanh below:

Math.atanh() - JavaScript | MDN

Math.atanh()

Baseline Widely available

Math.atanh() は静的メソッドで、数値の双曲線逆正接 (ハイパーボリックアークタンジェント) を返します。

∀ x ∊ ( − 1 , 1 ) , 𝙼𝚊𝚝𝚑.𝚊𝚝𝚊𝚗𝚑 ( 𝚡 ) = artanh ( x ) = the unique  y  such that  tanh ( y ) = x = 1 2 ln ( 1 + x 1 − x ) \begin{aligned}\forall x \in ({-1}, 1),\;\mathtt{\operatorname{Math.atanh}(x)} &= \operatorname{artanh}(x) = \text{the unique } y \text{ such that } \tanh(y) = x \\&= \frac{1}{2}\,\ln\left(\frac{1+x}{1-x}\right)\end{aligned} 試してみましょう
console.log(Math.atanh(-1));
// Expected output: -Infinity

console.log(Math.atanh(0));
// Expected output: 0

console.log(Math.atanh(0.5));
// Expected output: 0.549306144334055 (approximately)

console.log(Math.atanh(1));
// Expected output: Infinity
構文 引数
x

-1 ~ 1 の間で両端を含む数値です。

返値

x の双曲線逆正接 (ハイパーボリックアークタンジェント) です。 x が 1 の場合、 Infinity を返します。 x が -1 の場合、 -Infinity を返します。 x が -1 未満であるか 1 より大きな場合は、 NaN を返します。

解説

atanh() は Math の静的メソッドであるため、生成した Math オブジェクトのメソッドとしてではなく、常に Math.atanh() として使用するようにしてください (Math はコンストラクターではありません)。

例 Math.atanh() の使用
Math.atanh(-2); // NaN
Math.atanh(-1); // -Infinity
Math.atanh(-0); // -0
Math.atanh(0); // 0
Math.atanh(0.5); // 0.5493061443340548
Math.atanh(1); // Infinity
Math.atanh(2); // NaN
仕様書 ブラウザーの互換性 関連情報

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