Skip to content

Latest commit

 

History

History
20 lines (17 loc) · 510 Bytes

math_kb.rst

File metadata and controls

20 lines (17 loc) · 510 Bytes

Knowledge Base Math

Natural log and e

math.log(x) - returns the natural logarithm of x (to base e)
math.exp(x) -returns e raised to the power x, where e = 2.718281… is the base of natural logarithms.
math.e - Euler's number.

>>> math.e*3 20.085536923187664 >>> math.log(_) 3.0 # Illustrating log base e (ea e*b) = a + b >>> int(math.log(math.exp(5) math.exp(7))) # = 5 + 7 12 >>> math.log(math.exp(5) * math.exp(7)) 12.0