def binarySearch(left, right, largeEnough, eps):
    """
    Binary search on a real number region.

    Parameters
    ----------
    left, right : float
        The range [left, right] that will be searched. It is recommended that make sure the dividing point is between [left, right], or the result may not be the answer wanted.
    largeEnough : callable
        A callable(function) that accepts one float number, and decide whether it is large enough or not for the search. It is required that it should be monotonic: over some number it should be True, while below the number it returns False.
    eps : float
        The required accuracy of the binary search.

    Returns
    -------
    float
        The value just over which can make largeEnough return True, and below which it returns False.
    """
    assert (left < right), "binary search must start from where (left < right), but get left = {} and right = {}.".format(left, right)
    l = left 
    r = right
    mid = (l + r) * 0.5
    while (r - l > eps):
        if (largeEnough(mid)):
            r = mid 
        else:
            l = mid 
        mid = 0.5 * (l + r)
    return mid