def __len__(self):
        if self.M is None:
            return len(self.items)

        S = sum(math.pow(2.0, -x) for x in self.M)
        E = self.alpha * self.m * S / self.m
        if E <= 2.5 * self.m: # small range correction
            V = self.M.count(0)
            return self.m * math.log(self.m / float(V)) if V > 0 else E
        elif E <= float(1L << HASH_LEN) / 30.0: # intermidiate range correction -> No correction
            return E
        else:
            return -(1L << HASH_LEN) * math.log(1.0 - E / (1L << HASH_LEN))
dataset/ETHPy150Open douban/dpark/dpark/hyperloglog.py/HyperLogLog.__len__/swapped operands of `/`