Skip to content

Latest commit

 

History

History
44 lines (27 loc) · 1.26 KB

File metadata and controls

44 lines (27 loc) · 1.26 KB
title slug
Math.LOG2E
Web/JavaScript/Reference/Global_Objects/Math/LOG2E

{{JSRef}}

La propriété Math.LOG2E représente la valeur du logarithme en base 2 de e, environ 1.442 :

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

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

Description

LOG2E est une propriété statique de l'objet Math et doit toujours être utilisé avec la syntaxe Math.LOG2E plutôt que comme la propriété d'un autre objet qui aurait été créé (Math n'est pas un constructeur).

Exemples

Utiliser Math.LOG2E

La fonction suivante renvoie la valeur du logarithme en base 2 de e :

function getLog2e() {
  return Math.LOG2E;
}

getLog2e(); // 1.4426950408889634

Spécifications

{{Specifications}}

Compatibilité des navigateurs

{{Compat}}

Voir aussi

  • {{jsxref("Math.exp()")}}
  • {{jsxref("Math.log()")}}
  • {{jsxref("Math.log2()")}}