aboutsummaryrefslogtreecommitdiff
path: root/node_modules/core-js/modules/es.math.cosh.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/core-js/modules/es.math.cosh.js')
-rw-r--r--node_modules/core-js/modules/es.math.cosh.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/node_modules/core-js/modules/es.math.cosh.js b/node_modules/core-js/modules/es.math.cosh.js
new file mode 100644
index 0000000..0c7322a
--- /dev/null
+++ b/node_modules/core-js/modules/es.math.cosh.js
@@ -0,0 +1,15 @@
+var $ = require('../internals/export');
+var expm1 = require('../internals/math-expm1');
+
+var nativeCosh = Math.cosh;
+var abs = Math.abs;
+var E = Math.E;
+
+// `Math.cosh` method
+// https://tc39.github.io/ecma262/#sec-math.cosh
+$({ target: 'Math', stat: true, forced: !nativeCosh || nativeCosh(710) === Infinity }, {
+ cosh: function cosh(x) {
+ var t = expm1(abs(x) - 1) + 1;
+ return (t + 1 / (t * E * E)) * (E / 2);
+ }
+});