def binary_search_continuous(f, target, low, high):
    """Perform a floating-point binary search over the interval
    [low,high], evaluating the monotonically increasing function f at
    each point until f(x)=target."""
    low = float(low)
    high = float(high)
    while True:
        x = (low + high) / 2
        y = f(x)
        if y == target:
            return x
        elif y < target:
            low = x
        else:
            high = x
