diff --git a/packages/core-js/internals/math-log2.js b/packages/core-js/internals/math-log2.js deleted file mode 100644 index c29b5ab6da15..000000000000 --- a/packages/core-js/internals/math-log2.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; -var log = Math.log; -var LN2 = Math.LN2; - -// `Math.log2` method -// https://tc39.es/ecma262/#sec-math.log2 -// eslint-disable-next-line es/no-math-log2 -- safe -module.exports = Math.log2 || function log2(x) { - return log(x) / LN2; -}; diff --git a/packages/core-js/modules/es.math.log2.js b/packages/core-js/modules/es.math.log2.js index bd4b97e7a59c..9d610d68a8c4 100644 --- a/packages/core-js/modules/es.math.log2.js +++ b/packages/core-js/modules/es.math.log2.js @@ -1,9 +1,13 @@ 'use strict'; var $ = require('../internals/export'); -var log2 = require('../internals/math-log2'); + +var log = Math.log; +var LN2 = Math.LN2; // `Math.log2` method // https://tc39.es/ecma262/#sec-math.log2 $({ target: 'Math', stat: true }, { - log2: log2, + log2: function log2(x) { + return log(x) / LN2; + }, }); diff --git a/packages/core-js/modules/esnext.data-view.set-float16.js b/packages/core-js/modules/esnext.data-view.set-float16.js index 697fe826f558..5d1917ed102d 100644 --- a/packages/core-js/modules/esnext.data-view.set-float16.js +++ b/packages/core-js/modules/esnext.data-view.set-float16.js @@ -1,12 +1,13 @@ 'use strict'; var $ = require('../internals/export'); +var getBuiltInStaticMethod = require('../internals/get-built-in-static-method'); var uncurryThis = require('../internals/function-uncurry-this'); var aDataView = require('../internals/a-data-view'); var toIndex = require('../internals/to-index'); -// TODO: Replace with module dependency in `core-js@4` -var log2 = require('../internals/math-log2'); var roundTiesToEven = require('../internals/math-round-ties-to-even'); +// dependency: es.math.log2 +var log2 = getBuiltInStaticMethod('Math', 'log2'); var pow = Math.pow; var MIN_INFINITY16 = 65520; // (2 - 2 ** -11) * 2 ** 15