def bin_coeff(n, k):
    """
    Compute binomial coefficients.

    :param int n: Non-negative integer (*n* > 0).
    :param int k: Non-negative integer (*k* < *n*).

    :returns: Binomial coefficient.
    :rtype: float
    """
    if k < 0. or k > n:
        return 0.
    if k == 0 or k == n:
        return 1.
    k = min(k, n - k)
    c = 1.
    for i in range(k):
        c *= (n - i) / (i + 1)
    return c