function ziggurat_test ( )

%*****************************************************************************80
%
%% ziggurat_test() tests ziggurat().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    18 January 2019
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../ziggurat' );

  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'ziggurat_test():\n' );
  fprintf ( 1, '  MATLAB/Octave version %s.\n', version ( ) );
  fprintf ( 1, '  Test ziggurat().\n' );
%
%  Make sure that SEED controls the sequence and can restart it.
%
  ziggurat_test001 ( );
  ziggurat_test02 ( );
  ziggurat_test03 ( );
  ziggurat_test04 ( );
%
%  Measure the time it takes to generate a lot of variables.
%
  sample_num = 100000;

  ziggurat_test05 ( sample_num );
  ziggurat_test06 ( sample_num );
  ziggurat_test07 ( sample_num );
  ziggurat_test08 ( sample_num );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'ziggurat_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  fprintf ( 1, '\n' );
  timestamp ( );

  rmpath ( '../ziggurat' );

  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

