function zero_example ( a, b, f, title )

%*****************************************************************************80
%
%% zero_example() tests zero() on one test function.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    30 May 2021
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real A, B, the endpoints of the change of sign interval.
%
%    function value = F ( x ), the name of a user-supplied
%    function which evaluates the function whose zero is being sought.
%
%    string TITLE, a title for the problem.
%
  t = eps;

  [ z, calls ] = zero ( a, b, t, f );

  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 );

  return
end
