Math.LOG2E
Resum
La propietat Math.LOG2E
representa el logaritme de e en base 2, el valor del qual és aproximadament 1.442:
Property attributes of Math.LOG2E |
|
---|---|
Writable | no |
Enumerable | no |
Configurable | no |
Descripció
Com que LOG2E
és una propietat estàtica de Math
, sempre s'utilitza mitjançant la forma Math.LOG2E
, en comptes d'accedir a la propietat d'un objecte Math
creat (Math
no és un constructor).
Exemples
Exemple: Utilitzar Math.LOG2E
La següent funció retorna el logaritme de e en base 2:
function getLog2e() {
return Math.LOG2E;
}
getLog2e(); // 1.4426950408889634
Especificacions
Especificació | Estat | Comentaris |
---|---|---|
ECMAScript 1a Edició. | Standard | Definició inicial. Implementat a JavaScript 1.0. |
ECMAScript 5.1 (ECMA-262) The definition of 'Math.LOG2E' in that specification. |
Standard | |
ECMAScript 2015 (6th Edition, ECMA-262) The definition of 'Math.LOG2E' in that specification. |
Standard |
Compatibilitat amb navegadors
We're converting our compatibility data into a machine-readable JSON format.
This compatibility table still uses the old format,
because we haven't yet converted the data it contains.
Find out how you can help! (en-US)
Característica | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Suport bàsic | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) |
Característica | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Suport bàsic | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) |