Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Powers of 2 in lexical order yield decibels (2019). Parent comment
2^(10/3) ~= 10
2^(100/30) ~= 100
And I think this trick should work for powers of any a in any base b where there is a k such that
a^(b/k) ~= b
k ~= b * log a / log b a ~= e^ (k * (log_e b)/ b)
k ~= b * log a a = b^(k/b) 10 * log 2 = 3.0103 10 * log 5 = 6.9897
>>> approx = lambda a: sorted( [float(scale(str(a**k)[:3])) for k in range(0,10)]) >>> [10**(k/10.0) for k in range(0,10)] [1.0, 1.25, 1.58, 1.99, 2.51, 3.16, 3.98, 5.01, 6.30, 7.94] >>> approx(2) [1.0, 1.28, 1.60, 2.00, 2.56, 3.20, 4.00, 5.12, 6.40, 8.00] >>> approx(5) [1.0, 1.25, 1.56, 1.95, 2.50, 3.12, 3.90, 5.00, 6.25, 7.81]
There are no comments on this comment yet.
And I think this trick should work for powers of any a in any base b where there is a k such that
aka and if b is the base of your logarithm, this simplifies to , so 5 works too.... Is it a coincidence that this works for 2 and 5 in base 10, while 2*5 = 10 ?