diff options
Diffstat (limited to 'node_modules/babel-runtime/node_modules/core-js/library/modules/_math-fround.js')
-rw-r--r-- | node_modules/babel-runtime/node_modules/core-js/library/modules/_math-fround.js | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/node_modules/babel-runtime/node_modules/core-js/library/modules/_math-fround.js b/node_modules/babel-runtime/node_modules/core-js/library/modules/_math-fround.js deleted file mode 100644 index c85eb4b7e..000000000 --- a/node_modules/babel-runtime/node_modules/core-js/library/modules/_math-fround.js +++ /dev/null @@ -1,23 +0,0 @@ -// 20.2.2.16 Math.fround(x) -var sign = require('./_math-sign'); -var pow = Math.pow; -var EPSILON = pow(2, -52); -var EPSILON32 = pow(2, -23); -var MAX32 = pow(2, 127) * (2 - EPSILON32); -var MIN32 = pow(2, -126); - -var roundTiesToEven = function (n) { - return n + 1 / EPSILON - 1 / EPSILON; -}; - -module.exports = Math.fround || function fround(x) { - var $abs = Math.abs(x); - var $sign = sign(x); - var a, result; - if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; - a = (1 + EPSILON32 / EPSILON) * $abs; - result = a - (a - $abs); - // eslint-disable-next-line no-self-compare - if (result > MAX32 || result != result) return $sign * Infinity; - return $sign * result; -}; |