xtol = 0.000001;
a = 0.0;
b = 1.0;
[ x, a, b, bisect_num ] = bisection3 ( xtol, a, b, @myline );

fprintf ( 'F(%20.16g) = %g\n', x, myline ( x ) );
fprintf ( 'Number of bisections = %d\n', bisect_num );

ftol = 0.000001;
a = 0.0;
b = 1.0;
secant_max = 30;
[ x, secant_num ] = secant ( ftol, a, b, secant_max, @myline );

fprintf ( '\n' );
fprintf ( 'F(%20.16g) = %g\n', x, myline ( x ) );
fprintf ( 'Number of secant steps = %d\n', secant_num );
