function nonlin_bisect_test ( )

%*****************************************************************************80
%
%% nonlin_bisect_test() tests nonlin_bisect().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    24 July 2019
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../nonlin_bisect' );

  timestamp ( );
  fprintf ( 1, 'nonlin_bisect_test():\n' );
  fprintf ( 1, '  MATLAB/Octave version %s\n', version ( ) );
  fprintf ( 1, '  nonlin_bisect() is an interactive program to seek\n' );
  fprintf ( 1, '  a root of an equation using bisection.\n' );

  [ a, b, fa, fb ] = nonlin_bisect ( 'x.^2 - 2*x - 15', 0.0, 8.0 );

  [ a, b, fa, fb ] = nonlin_bisect ( 'cos(x) - x', 0.0, 1.0 );

  [ a, b, fa, fb ] = nonlin_bisect ( 'kepler(x)', 0.0, 10.0 );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'nonlin_bisect_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  timestamp ( );

  rmpath ( '../nonlin_bisect' );

  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

