mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-04 04:40:05 +02:00
add some packages
This commit is contained in:
23
node_modules/core-js/modules/_math-fround.js
generated
vendored
Normal file
23
node_modules/core-js/modules/_math-fround.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
// 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;
|
||||
};
|
Reference in New Issue
Block a user