clear all;close all;
format long;
f = @(x) x.^2-2;
x = 0.9;
d = 1;
while d>10^-10
    xp = x;    
    x = f(x)+x;
    d = abs(xp-x);
    x,d
end
