Javascript Math expm1()

Introduction

The Math.expm1() function returns ex - 1, where x is the argument, and e the base of the natural logarithms.
Math.expm1(x) // x is a number.
let a = Math.expm1(-1); // -0.6321205588285577 
console.log(a);/*from  w  w  w.j a va2s  .  co  m*/
a = Math.expm1(0);  // 0
console.log(a);
a = Math.expm1(1);  // 1.718281828459045
console.log(a);



PreviousNext

Related