def mysqrt(a):
    """Compute the square root of a using Newton's method: start with an
    approximate answer and iteratively improving it
    """
    estimate = a / 2 + 1 # Arbitrary estimae of the square root of a
    epsilon = 0.0000001
    while True:
        approx = (estimate + a / estimate)/2
        if abs(approx-estimate) < epsilon:
            return approx
        estimate = approx