function gumbel_cdf_test ( )

%*****************************************************************************80
%
%% GUMBEL_CDF_TEST tests GUMBEL_CDF.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    03 April 2016
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'GUMBEL_CDF_TEST\n' );
  fprintf ( 1, '  GUMBEL_CDF evaluates the Gumbel CDF.\n' );
  fprintf ( 1, '  GUMBEL_CDF_INV inverts the Gumbel CDF.\n' );
  fprintf ( 1, '  GUMBEL_PDF evaluates the Gumbel PDF.\n' );

  seed = 123456789;

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

  for i = 1 : 10

    [ x, seed ] = gumbel_sample ( seed );

    pdf = gumbel_pdf ( x );

    cdf = gumbel_cdf ( x );

    x2 = gumbel_cdf_inv ( cdf );

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

  end

  return
end
