main
Last change
on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
481 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 | var $ = require('../internals/export');
|
---|
3 |
|
---|
4 | // eslint-disable-next-line es/no-math-atanh -- required for testing
|
---|
5 | var $atanh = Math.atanh;
|
---|
6 | var log = Math.log;
|
---|
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 : log((1 + n) / (1 - n)) / 2;
|
---|
17 | }
|
---|
18 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.