FAILURE MAP
← Case archive

FA-72964 / Probabilistic sketches / Member archive

HyperLogLog register update: rank word not truncated to 32 bits · case 04

Ranks come out too small (even zero or negative) because index bits remain above the word.

Member previewVariant 4 · 3 implementations · 7 checks per implementation

Case contract

Input {p, hashes}. Each hash is reduced to its low 32 bits. The register index is the top p bits; the remaining 32-p bits, left-aligned in a 32-bit word, give rho = leading zeros + 1, and an all-zero remainder gives rho = 32 - p + 1. Each register keeps the maximum rho seen. Return the list of 2^p registers.

Why this case matters

Every HyperLogLog estimate and merge depends on registers being filled with exactly the same index and rank rule on every node.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
random hashes p=4[3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0][3, 0, 2, 4, 0, 1, 0, 2, 0, 3, 0, 0, 5, 3, 0, 0]Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗