ES6 - Math.log1p(x) Function
Returns the natural logarithm of 1+x.
Syntax
Math.log1p(x)
Parameter
- X − represents a number
Example
console.log("---Math.log1p()---")
console.log("Math.log1p(Math.E - 1): "+Math.log1p(Math.E - 1))
console.log("Math.log1p(17.5): "+Math.log1p(17.5))
Output
---Math.log1p()--- Math.log1p(Math.E - 1): 1 Math.log1p(17.5): 2.917770732084279
Advertisements