function glomin_example ( a, b, c, m, e, t, f, title )

%*****************************************************************************80
%
%% glomin_example() tests glomin() on one test function.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    13 June 2021
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real A, B, the endpoints of the interval.
%
%    real C, an initial guess for the global
%    minimizer.  If no good guess is known, C = A or B is acceptable.
%
%    real M, the bound on the second derivative.
%
%    real E, a positive tolerance, a bound for the
%    absolute error in the evaluation of F(X) for any X in [A,B].
%
%    real T, a positive absolute error tolerance.
%
%    function value = F ( X ), the name of a user-supplied
%    function whose global minimum is being sought.
%
%    string TITLE, a title for the problem.
%
  [ x, fx, calls ] = glomin ( a, b, c, m, e, t, f );
  fa = f ( a );
  fb = f ( b );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  %s\n', title );
  fprintf ( 1, '  M = %d\n', m );
  fprintf ( 1, '\n' );
  fprintf ( 1, '      A                 X             B\n' );
  fprintf ( 1, '    F(A)              F(X)          F(B)\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  %14f  %14f  %14f\n', a,  x,  b );
  fprintf ( 1, '  %14e  %14e  %14e\n', fa, fx, fb );
  fprintf ( 1, '  Number of calls to F = %d\n', calls );

  return
end
