6
$\begingroup$

In my paper, I have $\ln$, $\log$ and $\log_2$. But, I have used both $\ln$ and $\log$ interchangeably. I wanted to be consistent and use just one of them. Which one is better?

1) I choose $\ln$, then I have to use it when stating the results in terms of Big O, e.g., $O(n \ln{n})$. Is that OK? I have seen that when people state order-results, they use $\log$ in Big O.

2) I choose $\log$, and the first time I use it, I mention that the base of the logarithm in this paper is by default $e$.

Which one is better? If I want to use the second solution, what is the best way to state that?

$\endgroup$
  • 1
    $\begingroup$ I guess it depends on the field look at other papers published where you intend to publish and follow them $\endgroup$ – kjetil b halvorsen Aug 23 '17 at 19:10
  • $\begingroup$ Unless the context of the paper requires a specific base, I don't think it matter which approach you use. $\endgroup$ – Wintermute Aug 23 '17 at 19:10
  • $\begingroup$ If you're using $\log$ in exactly one way in your paper, it's usually best to just stick with $\log$. In the case that you switch between a natural base and another (say, base 2 in information-theoretic papers), then you can make the $\ln$/$\log$ distinction. But it's also just good to look at papers in your field and see what is the usual case. $\endgroup$ – Guillermo Angeris Aug 23 '17 at 19:11
  • 1
    $\begingroup$ Use $\ln$ when you mean $\log_e$, and use $\log_a$ when the base is "a \neq e". Of course, you can explicitly define what you take $\log$ to be, but if you interchange $\log$ (predefined to be $\log_e = \ln$, then the only justified way to use $\log$ with a base other than $e$ would be to explicitly subscript the bases for distinction. I happen to think that $\ln x \cdot \log_a x$, e.g., is much more clearly disambiguated. $\endgroup$ – Namaste Aug 23 '17 at 19:13
  • $\begingroup$ It's standard to use $\log$ in papers. What it says, implicitly, is "look at me, I'm a real, pure mathematician, not a dastardly engineer". $\endgroup$ – MathematicsStudent1122 Aug 23 '17 at 19:30
1
$\begingroup$

I suggest you use $\ln$ in the paper and $\log$ when you have order results (since the base of $\log$ does not matter, but it is conventional to use $\log$ when stating order results).

$\endgroup$
1
$\begingroup$

All log functions differ by a multiplicative constant. Therefore, notations like $O(n \log n)$ are unambiguous, because the $O$ absorbs multiplicative constants.

$\endgroup$
1
$\begingroup$

For any applicable base $b$ you have $$\log_b x = \frac 1{\ln b}\cdot\ln x$$ so $O(\log_b f(n))$ is exactly the same as $O(\ln f(n))$.

Sometimes $\log$ is used as a 'general' logarithm with the base unspecified, although constant and greater than $1$ (which is useful when multiplicative constant does not matter), while $\ln$ is log with base $e$ and $\lg$ is a logarithm with base $10$.
Sometimes $\log$ has a default base $2$, for example in computer science.

$\endgroup$
  • $\begingroup$ Is that common to use $\ln$ in Big-O? It is indicating a base, however, it is not necessary. I think it is not common. $\endgroup$ – Susan_Math123 Aug 23 '17 at 19:58
  • $\begingroup$ @Su20200 You're right: it is not common, because the base doesn't matter, it only introduces the constant factor which is dropped byBig-O anyway. So the symbol $\log$ is most appropriate, which denotes 'any, constant base'. $\endgroup$ – CiaPan Aug 24 '17 at 6:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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