4 lines
165 B
JavaScript
4 lines
165 B
JavaScript
|
// 20.2.2.14 Math.expm1(x)
|
||
|
module.exports = Math.expm1 || function expm1(x){
|
||
|
return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1;
|
||
|
};
|