Last change
on this file since 84d0fbb was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
492 bytes
|
Line | |
---|
1 | var $ = require('../internals/export');
|
---|
2 |
|
---|
3 | // eslint-disable-next-line es/no-math-asinh -- required for testing
|
---|
4 | var $asinh = Math.asinh;
|
---|
5 | var log = Math.log;
|
---|
6 | var sqrt = Math.sqrt;
|
---|
7 |
|
---|
8 | function asinh(x) {
|
---|
9 | return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : log(x + sqrt(x * x + 1));
|
---|
10 | }
|
---|
11 |
|
---|
12 | // `Math.asinh` method
|
---|
13 | // https://tc39.es/ecma262/#sec-math.asinh
|
---|
14 | // Tor Browser bug: Math.asinh(0) -> -0
|
---|
15 | $({ target: 'Math', stat: true, forced: !($asinh && 1 / $asinh(0) > 0) }, {
|
---|
16 | asinh: asinh
|
---|
17 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.