clear all
format long e
delete rslt.dat
diary rslt.dat
diary on

x0  = -0.5;
tol = eps;
fprintf('Results of Newton method (I): \n');
x   = newton('f', 'df', x0, tol);
fprintf('\n');

x0  = 1;
fprintf('Results of Newton method (II): \n');
x   = newton('f', 'df', x0, tol);
fprintf('\n');

diary off