ES6 - math expm1(X) Function



Equivalent to Math.exp(x) – 1.

Syntax

Math.expm1( x );   

Parameter

  • x − represents a number

Return Value

Returns the value of Math.exp(x) – 1

Example

console.log("---Math.expm1()---") 
console.log("Math.expm1(1) : "+Math.expm1(1)) 
console.log("Math.expm1(5.5) : "+Math.expm1(5.5))          

Output

---Math.expm1()--- 
Math.expm1(1) : 1.718281828459045 
Math.expm1(5.5) : 243.69193226422038            
Advertisements