<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def continuous_binary_search(f, lo, hi, gap=1e-4):
 """Binary search for a function :param f: boolean monotone function with f(hi) = True :param int lo: :param int hi: with hi >= lo :param float gap: :returns: first value x in [lo,hi] such that f(x), x is computed up to some precision :complexity: `O(log((hi-lo)/gap))` """

    while hi - lo > gap:
        # in other languages you can force floating division by using 2.0
        mid = (lo + hi) / 2.
        if f(mid):
            hi = mid
        else:
            lo = mid
    return lo