# What is log ? What does it mean? How does it transform a number?

What is log ? What does it mean? How does it transform a number?

/I'm a code and see log being used in legacy code I have to change.

Thanks

-
possible duplicate of Intuitive use of logarithms – t.b. May 9 '11 at 9:03
Have you tried Google / Wikipedia? en.wikipedia.org/wiki/Logarithm – Qiaochu Yuan May 9 '11 at 9:06
It would help to have a rough idea what the code does. In software, logs are often used for graphing or scoring for instance. – Oliver Emberton May 9 '11 at 9:29

The base-10 logarithm of a number $x$ is the power that you would need to raise 10 to to get $x$ as a result. For example, since $10^3=1000$, the base-10 logarithm of 1000 is 3.

In general the base-$b$ logarithm of $x$ (written $\log_bx$) is the number you need to raise $b$ to to get $x$. For example, if $b^y=x$ then $\log_bx=y$.

-

Exponent for a number $b$ ($b$ is called base; in practice usually $10$ or $2.718\ldots =e$) to get given number. E.g. $\log_3 81 = 4$ because $3^4=81$. $\log_{10}2 = 0.30103\ldots$ because $10^{0.30103\ldots} = 2$.

-

In addition, the logarithm of a number in a given base roughly reflects one less than the number of digits the number has in that base. For example, in base 10, log 100 = 2 (=3-1 digits)

-

## protected by Daniel Fischer♦Apr 19 at 10:39

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site.