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

Math.LOG2E プロパティは 2 を底とした e の対数、約 1.442 を表します。

+ +

Math.LOG2E=log2(e)1.442\mathtt{\mi{Math.LOG2E}} = \log_2(e) \approx 1.442

+ +
{{EmbedInteractiveExample("pages/js/math-log2e.html","shorter")}}
+ + + +
{{js_property_attributes(0, 0, 0)}}
+ +

解説

+ +

LOG2EMath オブジェクトの静的プロパティなので、 Math オブジェクトを生成してプロパティとして使用するのではなく、常に Math.LOG2E として使用するようにしてください (Math はコンストラクターではありません)。

+ +

+ +

Math.LOG2E の使用

+ +

以下の関数は、2を底とした e の対数を返します。

+ +
function getLog2e() {
+  return Math.LOG2E;
+}
+
+getLog2e(); // 1.4426950408889634
+
+ +

仕様書

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

ブラウザーの互換性

+ + + +

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

+ +

関連情報

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