es6.math.asinh.js 342 B

1234567891011
  1. // 20.2.2.5 Math.asinh(x)
  2. var $export = require('./_export');
  3. var $asinh = Math.asinh;
  4. function asinh(x) {
  5. return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1));
  6. }
  7. // Tor Browser bug: Math.asinh(0) -> -0
  8. $export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh });