def sqrt_bisect(n, steps=20, epsilon=10**-5):
    """Approximate square root by the bisection method."""
    assert n > 0
    assert epsilon > 0
    low = 0
    high = n
    step = 1
    sqrt = (low + high) / 2
    while abs(sqrt**2 - n) > epsilon and step <= steps:
        if sqrt**2 < n:
            low = sqrt
        else:
            high = sqrt
        sqrt = (low + high) / 2
        step += 1
    return sqrt