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/asinh/index.html | 98 ++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 files/ja/web/javascript/reference/global_objects/math/asinh/index.html (limited to 'files/ja/web/javascript/reference/global_objects/math/asinh') diff --git a/files/ja/web/javascript/reference/global_objects/math/asinh/index.html b/files/ja/web/javascript/reference/global_objects/math/asinh/index.html new file mode 100644 index 0000000000..55ae559ce6 --- /dev/null +++ b/files/ja/web/javascript/reference/global_objects/math/asinh/index.html @@ -0,0 +1,98 @@ +--- +title: Math.asinh() +slug: Web/JavaScript/Reference/Global_Objects/Math/asinh +tags: + - JavaScript + - Math + - Mathod + - Reference +translation_of: Web/JavaScript/Reference/Global_Objects/Math/asinh +--- +
{{JSRef}}
+ +

Math.asinh() 関数は、数値の双曲線逆正弦 (ハイパーボリックアークサイン) を返します。

+ +

Math.asinh(x)=arsinh(x)= the unique ysuch thatsinh(y)=x\mathtt{\operatorname{Math.asinh}(x)} = \operatorname{arsinh}(x) = \text{ the unique } \; y \; \text{such that} \; \sinh(y) = x

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

構文

+ +
Math.asinh(x)
+ +

引数

+ +
+
x
+
数値
+
+ +

返値

+ +

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

+ +

解説

+ +

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

+ +

+ +

Math.asinh() の使用

+ +
Math.asinh(1);  // 0.881373587019543
+Math.asinh(0);  // 0
+
+ +

ポリフィル

+ +

Math.asinh は、次の関数でエミュレートできます。

+ +
if (!Math.asinh) Math.asinh = function(x) {
+    var absX = Math.abs(x), w
+    if (absX < 3.725290298461914e-9) // |x| < 2^-28
+        return x
+    if (absX > 268435456) // |x| > 2^28
+        w = Math.log(absX) + Math.LN2
+    else if (absX > 2) // 2^28 >= |x| > 2
+        w = Math.log(2 * absX + 1 / (Math.sqrt(x * x + 1) + absX))
+    else
+        var t = x * x, w = Math.log1p(absX + t / (1 + Math.sqrt(1 + t)))
+
+    return x > 0 ? w : -w
+}
+
+ +

Math.log1p にもポリフィルを適用する必要があるかもしれません。詳しくは Math.log1p を参照してください。

+ +

仕様書

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

ブラウザーの互換性

+ + + +

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

+ +

関連情報

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