function y = newton_iteration(func, x, eps)

y = func(x);

while abs(y) > eps
    derivative = (func(x + eps) - y) / eps;
    x = x - y / derivative;
    y = func(x);
end

end

