JavaScript expm1() method
- Page précédente exp()
- Page suivante floor()
- Retour au niveau supérieur Manuel de référence JavaScript Math
Definition and usage
expm1()
the method returns Ex The value of subtracting 1, where E is the Euler number(approximately 2.7183),x is the number passed to it.
This method is more than using Math.exp() and subtract 1 for more accuracy.
Instance
Example 1
Find the exponential value of a number - 1 :
Math.expm1(3);
Example 2
Use the expm1() method for different numbers :
var a = Math.exp(1); var b = Math.exp(-1); var c = Math.exp(5); var d = Math.exp(10);
Syntax
Math.expm1(x)
Parameter value
Parameter | Description |
---|---|
x | Required. A number. |
Technical details
Return value : | A number, representing Ex - 1. |
---|---|
JavaScript version : | ECMAScript 2015 |
Compatibilité du navigateur
Méthode | Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
expm1() | 38.0 | 12.0 | 25.0 | 8.0 | 25.0 |
Pages connexes
Tutoriel :Mathématiques JavaScript
- Page précédente exp()
- Page suivante floor()
- Retour au niveau supérieur Manuel de référence JavaScript Math