diff options
Diffstat (limited to 'node_modules/core-js/modules/es.math.asinh.js')
| -rw-r--r-- | node_modules/core-js/modules/es.math.asinh.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/node_modules/core-js/modules/es.math.asinh.js b/node_modules/core-js/modules/es.math.asinh.js new file mode 100644 index 0000000..9308e21 --- /dev/null +++ b/node_modules/core-js/modules/es.math.asinh.js @@ -0,0 +1,16 @@ +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 +}); |
