From d393ed4301bf7d631c14bcadff4c4a900f38a1a1 Mon Sep 17 00:00:00 2001 From: Denis Pushkarev Date: Tue, 16 Apr 2024 17:25:01 +0700 Subject: [PATCH] some simplification --- packages/core-js/modules/esnext.math.sum-precise.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core-js/modules/esnext.math.sum-precise.js b/packages/core-js/modules/esnext.math.sum-precise.js index 7bf63f51579b..cf6aa694703b 100644 --- a/packages/core-js/modules/esnext.math.sum-precise.js +++ b/packages/core-js/modules/esnext.math.sum-precise.js @@ -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++) { @@ -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