1

I am studying number theory for cryptography and I've got confused by the log notation that they used.

In one video, prof Jonathan Kat refers to the length of a number as the number of bits that are needed to represent that number. To denote the length of a number two vertical bars surrounding the number are used and that is considered to be equal to the logarithm of the number magnitude. See below the expression:

$$\|a\|=O(\log a); a=2^{\|a\|} $$

My question is regarding the notation used for that logarithm. I have always thought that when a log appears without subscript was referring to $\log_{10}$, however in the above example is referring to $\log_{2}$. Then I googled and I found the following:

  • $x = \log y$ often means $x = \log_e y$ in mathematics texts.
  • $x = \log y$ often means $x = \log_{10} y$ in science and engineering texts.
  • $x = \log y$ often means $x = \log_2 y$ in computer science texts.

How often the above statement are met and why the use of different notation between fields?

user10354138
  • 33,239
Mario
  • 11
  • 2
    The base is implied for the most commonly used in the field. There is no point emphasising it as every extra information needed processing and breaks reading flow. – user10354138 Mar 10 '21 at 07:41
  • In this particular case, since $\log$ appears inside of $O$, it doesn't matter which base the writer was thinking of. – Mark S. Mar 10 '21 at 12:02

1 Answers1

2

Computer scientists, information theorists etc. have three choices: just use $\log$, use $\log_2$, and use any of several binary-logarithm symbols ($\operatorname{lb},\,\operatorname{ld},\,\operatorname{lg}$) and hope the reader knows theirs. For them, logarithms are often only important to within a $O(1)$ factor due to the prevalence of big-$O$ notation, and then the base isn't important enough to motivate the second or third option. In contexts where the specific asymptotic behaviour $\log_2n$ is worth mentioning and not obvious (and it would pretty much always be obvious), how often to mention that logarithms are base $2$ is up to the author, but they're likely to do it once rather than in every equation.

For mathematicians, unless you're dealing with things like "when $\log_ab$ is transcendental", or proving how different bases' logarithms are related in the first place, a logarithm will be natural. Any other base is too arbitrary and unhelpful. It's important, however, to understand the usage differences between $\ln$, $\log$ and $\operatorname{Log}$ in complex analysis.

Even in science and engineering, natural logarithms will be common because of all the calculus needed. I'm not sure base-$10$ logarithms would be used all that often: even when orders of magnitude are discussed, $x=10^y$ will probably come up rather than $y=\log_{10}x$. They might be used on log-axes, but hopefully they will either read $\log_{10}$, or be stated as base-$10$ at least once in the text, e.g. with the convention "$\ln$ for base $e$, $\log$ for base $10$".

J.G.
  • 115,835
  • I though that in complex analysis, $\operatorname{Log}(x)$ and $\ln(x)$ both refer to the principal logarithm of $x$, namely the number $y$ such that $\exp(y)=x$ and $\Im(y) \in (-\pi,\pi]$. Is there a distinction between $\operatorname{Log}(x)$ and $\ln(x)$ that I am missing here? – Joe Mar 10 '21 at 17:36