Re:Powers of 2 in lexical order yield decibels (2019)
by gowld on Monday February 28, 2022 @05:10PM
(#30505873)
Pulling a bit out, to try to find intuition:
log_2(10) ~= 10/3
10^(1/10) ~= cubeRoot(2)
So the first 10 decibels are ~= the first 10 powers of CubeRoot(2)"dividing by 10^n until you reach 1<y<10" is the operation: CubeRoot(2)^k -> CubeRoot(2) ^ (k mod 10)
So, the scaling operation on 2^m = CubeRoot(2)^3m is going to land on multiples of 1/3, and then sorting will put them in order.
You want 10 values, so you take the first 10 powers of 2. CubeRoot(2)^{0..9}
Remaining question: why do you get 10 distinct values? Well, it's because 2^a and 2^b only scale to the same value if (by logarithms) a - b = 10j.
Right, so where did I get those 6.6439 and 3.3219 numbers? Those are just the approximations of log2(100) and log2(10).
At the heart of the "lexicographic coincidence" seems to be the observation that these logarithms have .64 and .32 fractional parts, or about 2/3 and 1/3.
So for instance since 100 = 2^(log2(100), we can rewrite 1.28 as 128 / 2^(log2(100) which is 2^7/2^(log2(100)).
So then we have powers of two on top and bottom and can subtract them: 2^(7 - log2(100)), which is where we get 7 - 6.6439 = 0.3561.