massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / core-js / modules / es.math.acosh.js
1 var $ = require('../internals/export');
2 var log1p = require('../internals/math-log1p');
3
4 // eslint-disable-next-line es/no-math-acosh -- required for testing
5 var $acosh = Math.acosh;
6 var log = Math.log;
7 var sqrt = Math.sqrt;
8 var LN2 = Math.LN2;
9
10 var FORCED = !$acosh
11   // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509
12   || Math.floor($acosh(Number.MAX_VALUE)) != 710
13   // Tor Browser bug: Math.acosh(Infinity) -> NaN
14   || $acosh(Infinity) != Infinity;
15
16 // `Math.acosh` method
17 // https://tc39.es/ecma262/#sec-math.acosh
18 $({ target: 'Math', stat: true, forced: FORCED }, {
19   acosh: function acosh(x) {
20     return (x = +x) < 1 ? NaN : x > 94906265.62425156
21       ? log(x) + LN2
22       : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1));
23   }
24 });