Parameters or Arguments
number The variety used as the exponent in enumber – 1 the place e is the base of herbal logarithms.
The expm1() feature returns enumber – 1 where e is the base of natural logarithms and number is the exponent used in the calculation. The mathematical constant e has an approximate cost of 2.71828.
Math is a placeholder object that consists of mathematical features and constants of which expm1() is one of these functions.
console.log(Math.expm1(0)); console.log(Math.expm1(1)); console.log(Math.expm1(-2));
In this example, we have invoked the expm1() characteristic the usage of the Math class.
We have written the output of the expm1() characteristic to the net browser console log, for demonstration purposes, to exhibit what the expm1() characteristic returns.
The following will be output to the net browser console log:
0 1.718281828459045 -0.8646647167633873
In this example, the first output to the console log back 1 which is the calculation of e0 – 1.
The 2d output to the console log again 1.718281828459045 which is the calculation of e1 – 1.
The 0.33 output to the console log back -0.8646647167633873 which is the calculation of e-2 – 1.