function y=f(x);y=x^3-2*x^2+2*x-2;
endfunction
function y=g(x);y=3*x^2-4*x+2;
endfunction
x=2;
while f(x)*f(x-10^-6)>0
    x=x-f(x)/g(x)
    end
afficher ("x = " + string(x))