by goldenkey · 8y ago · 0 comments
The 63x64 binary canvas is made of integers on the order of 2^4032. (Please forgive my approximation notation.)
ln(2^4032) ~= 2795
log_10(2^4032) ~= 1214
So, the difference between natural log (for this canvas size) and log base 10 is only one binary digit (min 11, max 12). The "noise" you need to introduce to the image will definitely keep to the bottom right corner.So, I'm curious how tall the phone-width image needs to be before the required noise exceeds 64 bits (aka a single row). And the answer is... Too tall to be calculated quickly with my brute force method of "try bigger numbers until you get too impatient to wait for your desktop to calculate the natural log".
I'm sure if I spent enough time drawing the parameters out, I'd eventually agree that there's no representation of this problem where those factors ever become relevant.
BUT.
If the problem we were calculating involved log base 1.0001 instead of the natural log, those factors would become relevant at much smaller canvas sizes. I would love to hear an intuitive explanation of logarithms that would convince me to not bother making calculations like this in the future!
ln(2^n) = n * ln(2)
log_10(2^n) = n * log_10(2)
Which, substituting x for 2^n, gives log_10(x) = ln(x) * (log_10(2) / ln(2))
you can do replace 2 by any positive number here. So, the value of log_10(x) / ln(x)
is independent of x. A bit of thinking will show it to be equal to ln(10)
And indeed, 1214 * ln(10) ~= 2795,338The subthread started when someone thought it was necessary to point out that the log everyone was talking about was the natural log.
Independent of what the actual problem is, say someone tells you that something is log(n). It is a safe assumption that they mean ln(n), but if you are are speaking out loud, that is still pronounced "log n".
What I'm looking for is better intuitions on F/ln(n) versus F/log_x(n) for some completely arbitrary function F. The intuitions for x > e are very different than the intuitions for x < e. (This is just the nature of exponents. Maybe there is no further intuition for me to develop here, other than to just practice more.)
64n × ln 2 > 2⁶⁴
n > 2⁵⁸ ∕ (ln 2) ≈ 4.2E+17
I like to also put plenty of THIN SPACE ( ) in to give it space to breathe, e.g. 2 ⁶⁴ ⁿ and 64 n instead of 2⁶⁴ⁿ and 64n. I make my thin spaces with Compose+Space+'.
That looks nice and gets rid of the confusion over number like "1,234" and "1.234". In the US, the former is the integer 1234 and the later is the rational number 1234/1000. In Germany or France, these would be the other way around. In SI, "1.234" and "1,234" would both be 1234/1000, and the integer 1234 would be "1 234" with the space there being a thin space.
Unfortunately, HN does not support THIN SPACE as far as I can tell.
Reddit is a little better. You can enter it in a comment and it will be correctly saved with the comment and it will display correctly in the browser. As long as you don't need to make any edits to your comment afterwards, it is fine.
If you edit the comment thin spaces are converted to regular spaces when it loads the editing widget, so unless you go through and put all the thin spaces back you will lose them when you save.
I don't like ÷, and I can't be bothered about whitespace. Sorry!
The prime number theorem is of this stronger form, and it is in fact only the natural logarithm that makes the usual statement true. It is considerably more difficult to prove this asymptotic result (first proven 1896) than to get "within a multiplicative constant" as in big-O notation (first proven 1848--50).