1 var $ = require('../internals/export');
2 var log1p = require('../internals/math-log1p');
4 // eslint-disable-next-line es/no-math-acosh -- required for testing
5 var $acosh = Math.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;
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
22 : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1));