Home Download Get started Docs Examples. MathPI returns PI MathSQRT2 returns the square root of 2 MathSQRT1_2 returns the square root of 12 MathLN2 returns the natural logarithm of 2 MathLN10 returns the natural logarithm of 10 MathLOG2E returns base 2 logarithm of E MathLOG10E returns base 10 logarithm of E. The Mathlog function returns the natural logarithm base e of a number that is x 0 Mathlog x ln x the unique y such that e y x The JavaScript Mathlog function is equivalent to ln x in mathematics.
Because log10 is a static method of Math you always use it as Mathlog10 rather than as a method of a Math object you created Math is not a constructor.
Since Mathlog x in JavaScript returns the natural logarithm of x same as ln x for base 10 you can divide by Mathlog 10 same as ln 10. Mathjs is an extensive math library for JavaScript and Nodejs. Since Mathlog x in JavaScript returns the natural logarithm of x same as ln x for base 10 you can divide by Mathlog 10 same as ln 10. Dec 13 11 at 1623 So this ended up being a math question.