13
$\begingroup$

I'm a bit confused, $\log_{10} x = \log x $ right? I believe I've read somewhere that $\log_{2} x = \lg x$ but some people say $\lg = \log$.

So what does $\lg$ really stand for? specifically when talking about "binary trees"

$\endgroup$
2
  • $\begingroup$ There are many different notations. In the context of binary trees, you'd probably talk about $\log_2$, but I've seen it marked as $\log$, $\log_2$ or $\lg$. $\endgroup$ Commented Jan 19, 2013 at 16:04
  • 1
    $\begingroup$ Almost certainly $\log_2$ $-$ the hint is in the word 'binary'! $\endgroup$ Commented Jan 19, 2013 at 16:05

3 Answers 3

12
$\begingroup$

$\lg$ will usually stand for $\log_2$ when talking about binary. In Germany and Russia, $\lg$ refers to $\log_{10}$. Source

$\endgroup$
1
  • $\begingroup$ In Hungary as well $\endgroup$ Commented Mar 7, 2018 at 17:26
2
$\begingroup$

It is common that $\lg=\log_2$, but note that $\log_a = \Theta(\log_b)$, because $$\log_a x = \frac{\log_b x}{\log_b a}.$$

$\endgroup$
1
  • $\begingroup$ This remark is interesting because for the most part algorithms evaluation do not care about multiplicative factors. $\endgroup$
    – zwim
    Commented Sep 27, 2021 at 11:14
2
$\begingroup$

The ISO 80000 specification, published in 2019, tries to resolve the numerous ambiguities in the notations for logarithms. It recommends the following notations:

$\lg x\equiv\log_{10}x\\ \ln x\equiv\log_e x\\ {\rm lb}\, x\equiv\log_2 x$.

These ISO recommendations try to avoid the ambiguity in the notations for the common logarithm ${\rm Log}\, x\equiv\log x\equiv\log_{10} x$, as the same notation is sometimes used for the natural logarithm $\log x\equiv\ln x\equiv\log_e x$. The ISO rules also discourage the use of ${\rm lg}\, x\equiv\log_2 x$. See a discussion of the ambiguities HERE.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .