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:
538 bytes
|
Rev | Line | |
---|
[79a0317] | 1 | 'use strict';
|
---|
| 2 | var $ = require('../internals/export');
|
---|
| 3 |
|
---|
| 4 | // eslint-disable-next-line es/no-math-asinh -- required for testing
|
---|
| 5 | var $asinh = Math.asinh;
|
---|
| 6 | var log = Math.log;
|
---|
| 7 | var sqrt = Math.sqrt;
|
---|
| 8 |
|
---|
| 9 | function asinh(x) {
|
---|
| 10 | var n = +x;
|
---|
| 11 | return !isFinite(n) || n === 0 ? n : n < 0 ? -asinh(-n) : log(n + sqrt(n * n + 1));
|
---|
| 12 | }
|
---|
| 13 |
|
---|
| 14 | var FORCED = !($asinh && 1 / $asinh(0) > 0);
|
---|
| 15 |
|
---|
| 16 | // `Math.asinh` method
|
---|
| 17 | // https://tc39.es/ecma262/#sec-math.asinh
|
---|
| 18 | // Tor Browser bug: Math.asinh(0) -> -0
|
---|
| 19 | $({ target: 'Math', stat: true, forced: FORCED }, {
|
---|
| 20 | asinh: asinh
|
---|
| 21 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.