Skip to content

Commit

Permalink
simplify some constants definition
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Apr 16, 2024
1 parent e7e9d71 commit 51ce5d0
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions packages/core-js/modules/esnext.math.sum-precise.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,9 @@ var pow = Math.pow;
var push = uncurryThis([].push);

var POW_2_1023 = pow(2, 1023);
var MAX_SAFE_INTEGER = pow(2, 53) - 1;
// exponent 11111111110, significand all 1s
var MAX_DOUBLE = 1.79769313486231570815e+308; // 2 ** 1024 - 2 ** (1023 - 52)
// exponent 11111111110, significand all 1s except final 0
var PENULTIMATE_DOUBLE = 1.79769313486231550856e+308; // 2 ** 1024 - 2 * 2 ** (1023 - 52)
// exponent 11111001010, significand all 0s
var MAX_ULP = MAX_DOUBLE - PENULTIMATE_DOUBLE; // 1.99584030953471981166e+292, <- 2 ** (1023 - 52)
var MAX_SAFE_INTEGER = pow(2, 53) - 1; // 2 ** 53 - 1 === 9007199254740992
var MAX_DOUBLE = Number.MAX_VALUE; // 2 ** 1024 - 2 ** (1023 - 52) === 1.79769313486231570815e+308
var MAX_ULP = pow(2, 971); // 2 ** (1023 - 52) === 1.99584030953471981166e+292

var NOT_A_NUMBER = {};
var MINUS_INFINITY = {};
Expand Down

0 comments on commit 51ce5d0

Please sign in to comment.