esnext.math.iaddh.js 420 B

12345678910111213
  1. var $ = require('../internals/export');
  2. // `Math.iaddh` method
  3. // https://gist.github.com/BrendanEich/4294d5c212a6d2254703
  4. // TODO: Remove from `core-js@4`
  5. $({ target: 'Math', stat: true, forced: true }, {
  6. iaddh: function iaddh(x0, x1, y0, y1) {
  7. var $x0 = x0 >>> 0;
  8. var $x1 = x1 >>> 0;
  9. var $y0 = y0 >>> 0;
  10. return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0;
  11. }
  12. });