The JavaScript Mathlog method is equivalent to ln x in mathematics. Interestingly after I had this guide up for a while this turned out to be the question I was asked most frequently usually in terms that included phrases like Greek to me beats me or as above what on earth. If you need a logarithm to base 2 or 10 use Mathlog2 or Mathlog10.
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.
The JavaScript Mathlog method is equivalent to ln x in mathematics. 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. Because log2 is a static method of Math you always use it as Mathlog2 rather than as a method of a Math object you created Math is not a constructor. Logarithm is a word made up by Scottish mathematician John Napier 1550-1617 from the Greek word logos meaning proportion ratio or word and arithmos meaning number.