@classmethod
def alpha_m_squared(cls, m):
    """
        Computes the 'alpha-m-squared' constant used by the HyperLogLog algorithm.

        :param int m: this must be a power of two, cannot be less than
               16 (2:sup:`4`), and cannot be greater than 65536 (2:sup:`16`).
        :returns: gamma times ``registerCount`` squared where gamma is
                  based on the value of ``registerCount``.
        :rtype: float
        """
    if m < 16:
        raise Exception("'m' cannot be less than 16 ({m} < 16).".format(m=m))
    elif m == 16:
        return 0.673 * m * m
    elif m == 32:
        return 0.697 * m * m
    elif m == 64:
        return 0.709 * m * m
    else:
        return 0.7213 / (1.0 + 1.079 / m) * m * m
