Skip to content

Commit

Permalink
some simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Apr 16, 2024
1 parent 51cb7c8 commit d393ed4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core-js/modules/esnext.math.sum-precise.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ $({ target: 'Math', stat: true, forced: true }, {
}

var partials = [];
var overflow = 0; // conceptually 2**1024 times this value; the final partial is biased by this amount
var overflow = 0; // conceptually 2 ** 1024 times this value; the final partial is biased by this amount
var x, y, sum, hi, lo, tmp;

for (var i = 0; i < numbers.length; i++) {
Expand Down Expand Up @@ -97,7 +97,7 @@ $({ target: 'Math', stat: true, forced: true }, {
x = hi;
}
partials.length = actuallyUsedPartials;
if (x !== 0) partials[partials.length] = x;
if (x !== 0) push(partials, x);
}

// compute the exact sum of partials, stopping once we lose precision
Expand Down

0 comments on commit d393ed4

Please sign in to comment.