A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/es/docs/Web/JavaScript/Reference/Global_Objects/Math/LN2 below:

Math.LN2 - JavaScript | MDN

Math.LN2

Baseline Widely available

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 Pruébalo
function getNatLog2() {
  return Math.LN2;
}

console.log(getNatLog2());
// Expected output: 0.6931471805599453
Sobrescribir No Numerable No Configurable No 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 Compatibilidad con navegadores Ver también

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4