What Is Math.log in Python?


Quick Answer

"Math.log" is a Python mathematical function that computes the natural logarithm of a given value. The full syntax is "math.log(x[,base])," where x is the argument whose value is passed to the logarithm function. The value between the square brackets is optional and denotes the base of the logarithm.

Continue Reading
Related Videos

Full Answer

Like most other programming languages, Python offers various functions grouped into different libraries according to their utility. The math library can be loaded using the "Import Math" command. It also offers various other mathematical functions such as the exponential, various trigonometric functions, angular conversion functions or the "math.pi" and "math.e" routines that return important mathematical constants.

Learn more about Computer Programming

Related Questions