function lorentz_cdf_test ( )

%*****************************************************************************80
%
%% LORENTZ_CDF_TEST tests LORENTZ_CDF.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    03 April 2016
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'LORENTZ_CDF_TEST\n' );
  fprintf ( 1, '  LORENTZ_CDF evaluates the Lorentz CDF;\n' );
  fprintf ( 1, '  LORENTZ_CDF_INV inverts the Lorentz CDF.\n' );
  fprintf ( 1, '  LORENTZ_PDF evaluates the Lorentz PDF;\n' );

  seed = 123456789;

  fprintf ( 1, '\n' );
  fprintf ( 1, '       X            PDF           CDF            CDF_INV\n' );
  fprintf ( 1, '\n' );

  for i = 1 : 10

    [ x, seed ] = lorentz_sample ( seed );

    pdf = lorentz_pdf ( x );

    cdf = lorentz_cdf ( x );

    x2 = lorentz_cdf_inv ( cdf );

    fprintf ( 1, ' %14g  %14g  %14g  %14g\n', x, pdf, cdf, x2 );

  end

  return
end
