es6.math.atanh.js 304 B

1234567891011
  1. // 20.2.2.7 Math.atanh(x)
  2. var $export = require('./_export');
  3. var $atanh = Math.atanh;
  4. // Tor Browser bug: Math.atanh(-0) -> 0
  5. $export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', {
  6. atanh: function atanh(x) {
  7. return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2;
  8. }
  9. });