--- title: Number.EPSILON slug: Web/JavaScript/Reference/Global_Objects/Number/EPSILON translation_of: Web/JavaScript/Reference/Global_Objects/Number/EPSILON original_slug: Web/JavaScript/Referencia/Objectes_globals/Number/EPSILON ---
La propietat Number.EPSILON representa la diferència entre el nombre 1 i el valor més petit major que 1 que pot ser representat com un {{jsxref("Global_Objects/Number", "Number")}}.
Per tal d'accedir a la propietat no es fa necessari crear un objecte {{jsxref("Global_Objects/Number", "Number")}} ja que és una propietat estàtica i n'hi ha prou amb fer servir Number.EPSILON per a obtindre el valor.
La propietat EPSILON té un valor aproximat de 2.2204460492503130808472633361816E-16, és a dir, 2-52.
x = 0.2; y = 0.3; equal = (Math.abs(x - y) < Number.EPSILON);
| Especificació | Estat | Comentaris |
|---|---|---|
| {{SpecName('ES6', '#sec-15.7.3.7', 'Number.EPSILON')}} | {{Spec2('ES6')}} | Definició inicial |
| Característica | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| Suport bàsic | {{CompatVersionUnknown}} | {{CompatGeckoDesktop("25.0")}} | {{CompatNo}} | {{CompatVersionUnknown}} | {{CompatNo}} |
| Característica | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|---|
| Suport bàsic | {{CompatNo}} | {{CompatNo}} | {{CompatGeckoMobile("25.0")}} | {{CompatNo}} | {{CompatNo}} | {{CompatNo}} |