2016-10-10 03:43:44 +02:00
|
|
|
// 20.2.2.7 Math.atanh(x)
|
2017-08-14 05:01:11 +02:00
|
|
|
var $export = require('./_export');
|
|
|
|
var $atanh = Math.atanh;
|
2016-10-10 03:43:44 +02:00
|
|
|
|
2017-08-14 05:01:11 +02:00
|
|
|
// Tor Browser bug: Math.atanh(-0) -> 0
|
2017-05-27 17:36:13 +02:00
|
|
|
$export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', {
|
2017-08-14 05:01:11 +02:00
|
|
|
atanh: function atanh(x) {
|
2016-10-10 03:43:44 +02:00
|
|
|
return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2;
|
|
|
|
}
|
2017-08-14 05:01:11 +02:00
|
|
|
});
|