From 074785cea106179cb3305637055ab0a009ca74f2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:52 -0500 Subject: initial commit --- .../reference/global_objects/math/log2e/index.html | 82 ++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 files/pt-br/web/javascript/reference/global_objects/math/log2e/index.html (limited to 'files/pt-br/web/javascript/reference/global_objects/math/log2e') diff --git a/files/pt-br/web/javascript/reference/global_objects/math/log2e/index.html b/files/pt-br/web/javascript/reference/global_objects/math/log2e/index.html new file mode 100644 index 0000000000..26669a3b45 --- /dev/null +++ b/files/pt-br/web/javascript/reference/global_objects/math/log2e/index.html @@ -0,0 +1,82 @@ +--- +title: Math.LOG2E +slug: Web/JavaScript/Reference/Global_Objects/Math/LOG2E +tags: + - JavaScript + - Math + - Property + - Propriedade + - Reference + - Referência(2) +translation_of: Web/JavaScript/Reference/Global_Objects/Math/LOG2E +--- +
{{JSRef}}
+ +

A propriedade Math.LOG2E representa o logaritmo com base 2 de e, aproximadamente 1.442:

+ +

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

+ +
{{js_property_attributes(0, 0, 0)}}
+ +

Descrição

+ +

Por LOG2E ser uma propriedade estática de Math, deve-se sempre usá-la como Math.LOG2E, e não como propriedade de um objeto Math criado por você (Math não é um construtor).

+ +

Exemplos

+ +

Usando Math.LOG2E

+ +

A função a seguir retorna o logaritmo com base 2 de e:

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

Especificações

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('ES1')}}{{Spec2('ES1')}}Initial definition. Implemented in JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.8.1.4', 'Math.LOG2E')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-math.log2e', 'Math.LOG2E')}}{{Spec2('ES6')}} 
{{SpecName('ESDraft', '#sec-math.log2e', 'Math.LOG2E')}}{{Spec2('ESDraft')}} 
+ +

Compatibilidade nos navegadores

+ + + +

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

+ +

Veja também

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