function circle_positive_distance_test ( )

%*****************************************************************************80
%
%% circle_positive_distance_test() tests circle_positive_distance().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    10 August 2023
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../circle_positive_distance' );

  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'circle_positive_distance_test():\n' );
  fprintf ( 1, '  MATLAB/Octave version %s.\n', version ( ) );
  fprintf ( 1, '  Test circle_distance().\n' );

  n = 10000;
  [ mu, var ] = circle_positive_distance_stats ( n );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Using N = %d sample points,\n', n );
  fprintf ( 1, '  Estimated mean distance = %g\n', mu );
  fprintf ( 1, '  Estimated variance      = %g\n', var );

  n = 10000;
  circle_positive_distance_histogram ( n );
  filename = 'circle_positive_distance_histogram.png';
  print ( '-dpng', filename );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Graphics saved in "%s"\n', filename );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'circle_positive_distance_test:\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  fprintf ( 1, '\n' );
  timestamp ( );

  rmpath ( '../circle_positive_distance' );

  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

