In mathematics, the logarithm of a number to a given base is the power or exponent to which the base must be raised in order to produce that number. For example, the logarithm of 1000 to base 10 is 3, because 3 is the power to which ten must be raised to produce 1000: 103 = 1000, so log101000 = 3. Only positive real numbers have real number logarithms; negative and complex numbers have complex logarithms.
The logarithm of x to the base b is written logb(x) or, if the base is implicit, as log(x). So, for a number x, a base b and an exponent y,
