aboutsummaryrefslogtreecommitdiff
path: root/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.math.asinh.js
blob: ddf466628c5418f0fbe6f09e1813b18756bdbb94 (plain)
1
2
3
4
5
6
7
8
9
10
// 20.2.2.5 Math.asinh(x)
var $export = require('./_export');
var $asinh = Math.asinh;

function asinh(x) {
  return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1));
}

// Tor Browser bug: Math.asinh(0) -> -0
$export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh });