From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../reference/global_objects/math/atanh/index.html | 92 ++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 files/ja/web/javascript/reference/global_objects/math/atanh/index.html (limited to 'files/ja/web/javascript/reference/global_objects/math/atanh') diff --git a/files/ja/web/javascript/reference/global_objects/math/atanh/index.html b/files/ja/web/javascript/reference/global_objects/math/atanh/index.html new file mode 100644 index 0000000000..fd35f305e2 --- /dev/null +++ b/files/ja/web/javascript/reference/global_objects/math/atanh/index.html @@ -0,0 +1,92 @@ +--- +title: Math.atanh() +slug: Web/JavaScript/Reference/Global_Objects/Math/atanh +tags: + - JavaScript + - Math + - Method + - Reference +translation_of: Web/JavaScript/Reference/Global_Objects/Math/atanh +--- +
{{JSRef}}
+ +

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

+ +

x(-1,1),Math.atanh(x)=arctanh(x)= the unique ysuch thattanh(y)=x\forall x \in \left( -1, 1 \right), \mathtt{\operatorname{Math.atanh}(x)} = \operatorname{arctanh}(x) = \text{ the unique } \; y \; \text{such that} \; \tanh(y) = x

+ +
{{EmbedInteractiveExample("pages/js/math-atanh.html")}}
+ + + +

構文

+ +
Math.atanh(x)
+ +

引数

+ +
+
x
+
数値。
+
+ +

返値

+ +

与えられた数値の双曲線逆正接 (ハイパーボリックアークタンジェント) です。

+ +

解説

+ +

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

+ +

+ +

Math.atanh() の使用

+ +
Math.atanh(-2);  // NaN
+Math.atanh(-1);  // -Infinity
+Math.atanh(0);   // 0
+Math.atanh(0.5); // 0.5493061443340548
+Math.atanh(1);   // Infinity
+Math.atanh(2);   // NaN
+
+ +

1よりも大きな値もしくは -1 よりも小さな値に対しては、 {{jsxref("NaN")}} が返されます。

+ +

ポリフィル

+ +

|x|<1\left|x\right| < 1に対して、 artanh(x)=12ln(1+x1-x)\operatorname {artanh} (x) = \frac{1}{2}\ln \left( \frac{1 + x}{1 - x} \right) になり、次の関数でエミュレートできます。

+ +
Math.atanh = Math.atanh || function(x) {
+  return Math.log((1+x)/(1-x)) / 2;
+};
+
+ +

仕様書

+ + + + + + + + + + + + +
仕様書
{{SpecName('ESDraft', '#sec-math.atanh', 'Math.atanh')}}
+ +

ブラウザーの互換性

+ + + +

{{Compat("javascript.builtins.Math.atanh")}}

+ +

関連情報

+ + -- cgit v1.2.3-54-g00ecf