You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
445 B
17 lines
445 B
4 years ago
|
var $ = require('../internals/export');
|
||
|
|
||
|
var nativeAsinh = Math.asinh;
|
||
|
var log = Math.log;
|
||
|
var sqrt = Math.sqrt;
|
||
|
|
||
|
function asinh(x) {
|
||
|
return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : log(x + sqrt(x * x + 1));
|
||
|
}
|
||
|
|
||
|
// `Math.asinh` method
|
||
|
// https://tc39.github.io/ecma262/#sec-math.asinh
|
||
|
// Tor Browser bug: Math.asinh(0) -> -0
|
||
|
$({ target: 'Math', stat: true, forced: !(nativeAsinh && 1 / nativeAsinh(0) > 0) }, {
|
||
|
asinh: asinh
|
||
|
});
|