# méthode de Héron

def heron(a, e):
    c = 1
    while abs(c * c - a) >= e:
        c = (c + a / c) / 2
    return c