massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / core-js / modules / es.math.sinh.js
1 var $ = require('../internals/export');
2 var fails = require('../internals/fails');
3 var expm1 = require('../internals/math-expm1');
4
5 var abs = Math.abs;
6 var exp = Math.exp;
7 var E = Math.E;
8
9 var FORCED = fails(function () {
10   // eslint-disable-next-line es/no-math-sinh -- required for testing
11   return Math.sinh(-2e-17) != -2e-17;
12 });
13
14 // `Math.sinh` method
15 // https://tc39.es/ecma262/#sec-math.sinh
16 // V8 near Chromium 38 has a problem with very small numbers
17 $({ target: 'Math', stat: true, forced: FORCED }, {
18   sinh: function sinh(x) {
19     return abs(x = +x) < 1 ? (expm1(x) - expm1(-x)) / 2 : (exp(x - 1) - exp(-x - 1)) * (E / 2);
20   }
21 });