(k, i)
return float(k_fact / (k_i_fact * i_fact))
Computes the binomial coefficient (denoted by *k choose i*).

    Please see the following website for details: http://mathworld.wolfram.com/BinomialCoefficient.html

    :param k: size of the set of distinct elements
    :type k: int
    :param i: size of the subsets
    :type i: int
    :return: combination of *k* and *i*
    :rtype: float
Computes the binomial coefficient (denoted by *k choose i*).
Computes the binomial coefficient ( denoted by * k choose i * ) .
def binomial_coefficient(k, i):
    """ Computes the binomial coefficient (denoted by *k choose i*).

    Please see the following website for details: http://mathworld.wolfram.com/BinomialCoefficient.html

    :param k: size of the set of distinct elements
    :type k: int
    :param i: size of the subsets
    :type i: int
    :return: combination of *k* and *i*
    :rtype: float
    """
    # Special case
    if i > k:
        return float(0)
    # Compute binomial coefficient
    k_fact = math.factorial(k)
    i_fact = math.factorial(i)
    k_i_fact = math.factorial(k - i)
    return float(k_fact / (k_i_fact * i_fact))
def binomial_coefficient ( k , i ) : # Special case if i > k : return float ( 0 ) # Compute binomial coefficient k_fact = math . factorial ( k ) i_fact = math . factorial ( i ) k_i_fact = math . factorial ( k - i ) return float ( k_fact / ( k_i_fact * i_fact ) )