Example 1 — Basic Use
The result is e^x - 1.
console.log(Math.expm1(0)); // 0
console.log(Math.expm1(1)); // 1.718281828459045
console.log(Math.expm1(-1)); // -0.6321205588285577
console.log(Math.expm1(2)); // 6.38905609893065 How It Works
- Zero.
e^0 - 1is0. - One.
e - 1is about1.7183. - Negative. For negative inputs the result is between
-1and0.

