Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

2^2^9 is 1.340781e+154


In this format, exponents are evaluated left to right, so this is 4^9 which is 262144 and is reasonable.


That's certainly not the standard. If anything, exponentiation is usually performed right to left, with some exceptions [0]. However, the fact that we even have carets in this conversation isn't because the GP wanted to adopt a left-to-right convention, but due to limitations in the richness of HN's text editor.

If you write a tower of 2^2^9 on a whiteboard and ask 1000 mathematicians and computer scientists to evaluate it, I'm sure 999 or 1000 of them would evaluate it as 2^(2^9).

[0] https://en.wikipedia.org/wiki/Order_of_operations#Serial_exp...


I'm a mathematician and a computer scientist, so I must be one in a thousand. The link even indicates that ambiguity exists in wild, and I think clear notation would help.

In this case, the absurdity of the number suggests a more realistic number.


A good mnemonic is that a^b^c normally associates to the right because if you meant (a^b)^c, you could have just written a^(bc).


Don't you think it's more likely that the original poster made a mistake and that a graph algorithm isn't actually O(2^2^n)? I can't name a single meaningful algorithm that has that time complexity.


But that would not be hyperexponential as GP claimed.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: