In mathematics, the logarithm of a number is the exponent by which another fixed value, the base, must be raised to produce that number. For example, the logarithm of 1000 to base 10 is 3, because 1000 is 10 to the 3rd power: 1000 = 10 = 10 × 10 × 10. More generally, if x = b, then y is the logarithm of x to base b, written logb x, so log10 1000 = 3. As a single-variable function, the logarithm to base b is the inverse of exponentiation with base b.
The logarithm base 10 is called the decimal or common logarithm and is commonly used in science and engineering. The natural logarithm has the number e ≈ 2.718 as its base; its use is widespread in mathematics and physics because of its very simple derivative. The binary logarithm uses base 2 and is widely used in computer science, information theory, music theory, and photography. When the base is unambiguous from the context or irrelevant it is often omitted, and the logarithm is written log x.