babel/test/fixtures/traceur/Number/EPSILON.module.js
2015-01-04 19:40:09 +11:00

11 lines
278 B
JavaScript

import {EPSILON} from '../../../src/runtime/polyfills/Number.js';
function testEpsilon(epsilon) {
assert.equal(epsilon, Math.pow(2, -52));
assert.equal(1 + epsilon - 1, epsilon);
assert.equal(1 + epsilon / 2 - 1, 0);
}
testEpsilon(EPSILON);
testEpsilon(Number.EPSILON);