function zero_itp_example ( f, a, b, epsi, k1, k2, n0, verbose, title )

%*****************************************************************************80
%
%% zero_itp_example() tests zero_itp() on a test function.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    02 March 2024
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    function f ( x ): the user-supplied function.
%
%    real a, b: the endpoints of the change of sign interval.
%
%    real epsi: error tolerance between exact and computed roots.
%
%    real k1: a parameter, with suggested value 0.2 / ( b - a ).
%
%    real k2: a parameter, typically set to 2.
%
%    integer n0: a parameter that can be set to 0 for difficult problems,
%    but is usually set to 1, to take more advantage of the secant method.
%
%    logical verbose: if true, requests additional output from zero_itp().
%
%    string title: a title for the problem.
%
  [ z, fz, calls ] = zero_itp ( f, a, b, epsi, k1, k2, n0, verbose );

  fz = f ( z );
  fa = f ( a );
  fb = f ( b );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  %s\n', title );
  fprintf ( 1, '\n' );
  fprintf ( 1, '      A                 Z             B\n' );
  fprintf ( 1, '    F(A)              F(Z)          F(B)\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  %14f  %14f  %14f\n', a,  z,  b );
  fprintf ( 1, '  %14e  %14e  %14e\n', fa, fz, fb );
  fprintf ( 1, '  Number of calls to F = %d\n', calls );
  fprintf ( 1, '  Tolerance epsi = %g\n', epsi );
  fprintf ( 1, '  Parameters k1 = %g, k2 = %g, n0 = %d\n', k1, k2, n0 );

  return
end
