Untitled
public text v1 · immutablefunction newtons_method(f) =
x_0 = 0;
x_current = 0;
x_new = 0;
while(abs(x_new - x_current) > 0.005)
x_new = x_current - f(x_current)/diff(f(x_current))
x_current = x_new;
end
x_new;
function newtons_method(f) =
x_0 = 0;
x_current = 0;
x_new = 0;
while(abs(x_new - x_current) > 0.005)
x_new = x_current - f(x_current)/diff(f(x_current))
x_current = x_new;
end
x_new;