def _calc_a(self, r, b):
        '''
        Compute the function A(r, b)
        '''
        if r == 0.0:
            # Find the limit of A(r, b) as r -> 0.
            return 1.0 / (1 << b)
        return r * (1 - r) ** (2 ** b - 1) / (1 - (1 - r) ** (2 * b))
dataset/ETHPy150Open ekzhu/datasketch/datasketch/b_bit_minhash.py/bBitMinHash._calc_a/original