New answers tagged

11

Python 3, score = big(?) from math import exp, log, log1p def f(b, n): e = n * (n - 1) / 2 m = 0 c = 1 s = 0 t = 1 << b for k in range(b): s += c m += exp(e * (log1p(-s / t) if 2 * s < t else log((t - s) / t))) c = c * (b - k) // (k + 1) return m Try it online! The Hamming distance \$D_{x, y}\$ ...


Top 50 recent answers are included