Skip to content

Commit

Permalink
In Microsoft Edge v0.22, Math.pow(2, -1074) returns 0, not 5e-324.
Browse files Browse the repository at this point in the history
Just use the spec value instead.
  • Loading branch information
ljharb committed Jun 21, 2015
1 parent c1b21f9 commit 59ed375
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/math.js
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,8 @@ describe('Math', function () {
});

it('returns zero for really small numbers', function () {
expect(Number.MIN_VALUE).to.equal(Math.pow(2, -1074)); // sanity check
expect(Number.MIN_VALUE).to.equal(5e-324);

expect(Math.fround(Number.MIN_VALUE)).to.equal(0);
expect(Math.fround(-Number.MIN_VALUE)).to.equal(0);
});
Expand Down

0 comments on commit 59ed375

Please sign in to comment.