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.
18 lines
503 B
18 lines
503 B
var $ = require('../internals/export'); |
|
|
|
// eslint-disable-next-line es-x/no-math-asinh -- required for testing |
|
var $asinh = Math.asinh; |
|
var log = Math.log; |
|
var sqrt = Math.sqrt; |
|
|
|
function asinh(x) { |
|
var n = +x; |
|
return !isFinite(n) || n == 0 ? n : n < 0 ? -asinh(-n) : log(n + sqrt(n * n + 1)); |
|
} |
|
|
|
// `Math.asinh` method |
|
// https://tc39.es/ecma262/#sec-math.asinh |
|
// Tor Browser bug: Math.asinh(0) -> -0 |
|
$({ target: 'Math', stat: true, forced: !($asinh && 1 / $asinh(0) > 0) }, { |
|
asinh: asinh |
|
});
|
|
|