Version 1
[yaffs-website] / node_modules / core-js / library / modules / _math-expm1.js
diff --git a/node_modules/core-js/library/modules/_math-expm1.js b/node_modules/core-js/library/modules/_math-expm1.js
new file mode 100644 (file)
index 0000000..5131aa9
--- /dev/null
@@ -0,0 +1,10 @@
+// 20.2.2.14 Math.expm1(x)
+var $expm1 = Math.expm1;
+module.exports = (!$expm1
+  // Old FF bug
+  || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168
+  // Tor Browser bug
+  || $expm1(-2e-17) != -2e-17
+) ? function expm1(x){
+  return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1;
+} : $expm1;
\ No newline at end of file