|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
509 bytes
|
| Line | |
|---|
| 1 | 'use strict';
|
|---|
| 2 | var $ = require('../internals/export');
|
|---|
| 3 | var log1p = require('../internals/math-log1p');
|
|---|
| 4 |
|
|---|
| 5 | // eslint-disable-next-line es/no-math-atanh -- required for testing
|
|---|
| 6 | var $atanh = Math.atanh;
|
|---|
| 7 |
|
|---|
| 8 | var FORCED = !($atanh && 1 / $atanh(-0) < 0);
|
|---|
| 9 |
|
|---|
| 10 | // `Math.atanh` method
|
|---|
| 11 | // https://tc39.es/ecma262/#sec-math.atanh
|
|---|
| 12 | // Tor Browser bug: Math.atanh(-0) -> 0
|
|---|
| 13 | $({ target: 'Math', stat: true, forced: FORCED }, {
|
|---|
| 14 | atanh: function atanh(x) {
|
|---|
| 15 | var n = +x;
|
|---|
| 16 | return n === 0 ? n : log1p(2 * n / (1 - n)) / 2;
|
|---|
| 17 | }
|
|---|
| 18 | });
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.