From a55b575e8089ee6cab7c5c262a7e6db55d0e34d6 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 14:46:50 +0100 Subject: unslug es: move --- .../reference/global_objects/math/ln2/index.html | 83 ++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 files/es/web/javascript/reference/global_objects/math/ln2/index.html (limited to 'files/es/web/javascript/reference/global_objects/math/ln2/index.html') diff --git a/files/es/web/javascript/reference/global_objects/math/ln2/index.html b/files/es/web/javascript/reference/global_objects/math/ln2/index.html new file mode 100644 index 0000000000..4a447f677a --- /dev/null +++ b/files/es/web/javascript/reference/global_objects/math/ln2/index.html @@ -0,0 +1,83 @@ +--- +title: Math.LN2 +slug: Web/JavaScript/Referencia/Objetos_globales/Math/LN2 +tags: + - JavaScript + - Math + - Property + - Referencia +translation_of: Web/JavaScript/Reference/Global_Objects/Math/LN2 +--- +
{{JSRef}}
+ +

La propiedad Math.LN2 representa el logaritmo natural de 2, aproximadamente 0.693:

+ +

Math.LN2=ln(2)0.693\mathtt{\mi{Math.LN2}} = \ln(2) \approx 0.693

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

Descripción

+ +

Como LN2 es una propiedad estática de Math, siempre se usa como Math.LN2, en lugar de como una propiedad de un objeto Math que ha creado (Math no es un constructor).

+ +

Ejemplos

+ +

Utilizando Math.LN2

+ +

La función siguiente devuelve el logaritmo natural de 2:

+ +
function getNatLog2() {
+  return Math.LN2;
+}
+
+getNatLog2(); // 0.6931471805599453
+ +

Especificaciones

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
EspecificaciónEstadoComentario
{{SpecName('ES1')}}{{Spec2('ES1')}}Definición inicial. Implementado en JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.8.1.3', 'Math.LN2')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-math.ln2', 'Math.LN2')}}{{Spec2('ES6')}} 
{{SpecName('ESDraft', '#sec-math.ln2', 'Math.LN2')}}{{Spec2('ESDraft')}} 
+ +

Compatibilidad con navegadores

+ + + +

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

+ +

Ver también

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