Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.


share|cite|improve this question
possible duplicate of Intuitive use of logarithms – t.b. May 9 '11 at 9:03
Have you tried Google / Wikipedia? – 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
up vote 3 down vote accepted

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$.

More information:

share|cite|improve this answer

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)

share|cite|improve this answer

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$.

share|cite|improve this answer

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 (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.