function local_min_rc_test ( )

%*****************************************************************************80
%
%% local_min_rc_test() tests local_min_rc().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    29 May 2021
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../local_min_rc' );

  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'local_min_rc_test():\n' );
  fprintf ( 1, '  MATLAB/Octave version %s\n', version ( ) );
  fprintf ( 1, '  Test local_min_rc()\n' );

  a = 0.0;
  b = 3.141592653589793;
  local_min_rc_example ( a, b, @g_01, 'g_01(x) = ( x - 2 ) * ( x - 2 ) + 1' );

  a = 0.0;
  b = 1.0;
  local_min_rc_example ( a, b, @g_02, 'g_02(x) = x * x + exp ( - x )' );

  a = -2.0;
  b =  2.0;
  local_min_rc_example ( a, b, @g_03, 'g_03(x) = x^4 + 2x^2 + x + 3' );

  a =  0.0001;
  b =  1.0;
  local_min_rc_example ( a, b, @g_04, 'g_04(x) = exp ( x ) + 1 / ( 100 x )' );

  a =  0.0002;
  b = 2.0;
  local_min_rc_example ( a, b, @g_05, ...
    'g_05(x) = exp ( x ) - 2x + 1/(100x) - 1/(1000000x^2)' );

  a = 1.8;
  b = 1.9;
  local_min_rc_example ( a, b, @g_06, 'g_06(x) = - x * sin ( 10 pi x ) - 1' );

  a = 0.0;
  b = 2.0;

  local_min_rc_example ( a, b, @g_07, 'g_07(x) = 2x^4 - 4x^2 + x + 20' );

  a = -2.0;
  b = 0.0;

  local_min_rc_example ( a, b, @g_07, 'g_07(x) = 2x^4 - 4x^2 + x + 20' );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'local_min_rc_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  fprintf ( 1, '\n' );
  timestamp ( );

  rmpath ( '../local_min_rc' );

  return
end
function timestamp ( )

%*****************************************************************************80
%
%% timestamp() prints the current YMDHMS date as a timestamp.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 February 2003
%
%  Author:
%
%    John Burkardt
%
  t = now;
  c = datevec ( t );
  s = datestr ( c, 0 );
  fprintf ( 1, '%s\n', s );

  return
end

