# What does a superscript after log mean?

In this paper they mention an algorithm has big-O time complexity of $O(\log^4n)$, what does the $\log^4$ mean? I understand $\log_4x$ is the log with base 4 of x.

• $\log$ to the power of $4$ in this case. Oct 8, 2015 at 19:46
• @Thomas so $(log(n))^4$ right?
– AJP
Oct 8, 2015 at 20:10
• yes, that's correct Oct 8, 2015 at 20:13
• This is a horrific notation, jesus.
– iono
Feb 11, 2023 at 13:12

As mentioned by another user already this must be an exponent. The only exception where a superscript would be used for a logarithm to denote the base is as follows: $^4 log(n)$, which means log base 4.

• Good. I'm glad there seems to be consensus on this even though it is unusual notation.
– AJP
Oct 8, 2015 at 20:09
• @AJP That notation is quite usual in Europe... Oct 8, 2015 at 20:15
• @imranfat I've seen the $^4log(n)$ before though but never the $log^4(n)$...
– AJP
Oct 8, 2015 at 20:19
• @AJP: I've seen $\log^4(n)$ before but never $^4\log(n)$. (I live in Europe.) Oct 8, 2015 at 20:23
• My first guess was that it meant $\log (\log (\log (\log n))))$. I'm glad it's not. The instance I saw was $\log^r(n)$. I didn't want to have to think about an arbitrary number of iterations of $\log$ of $\log$.
– Mars
Feb 14, 2021 at 18:24