function gamma_cdf_test ( )

%*****************************************************************************80
%
%% gamma_cdf_test() tests gamma_cdf().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    06 April 2016
%
%  Author:
%
%    John Burkardt
%
  a = 1.0;
  b = 1.5;
  c = 3.0;

  check = gamma_check ( a, b, c );

  if ( ~ check );
    fprintf ( 1, '\n' );
    fprintf ( 1, 'gamma_cdf_test(): Fatal error!\n' );
    fprintf ( 1, '  The parameters are not legal.\n' );
    return
  end

  fprintf ( 1, '\n' );
  fprintf ( 1, 'gamma_cdf_test():\n' );
  fprintf ( 1, '  gamma_cdf() evaluates the Gamma CDF.\n' );
  fprintf ( 1, '  gamma_pdf() evaluates the Gamma PDF.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  PDF parameter A =             %14g\n', a );
  fprintf ( 1, '  PDF parameter B =             %14g\n', b );
  fprintf ( 1, '  PDF parameter C =             %14g\n', c );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  X  PDF   CDF\n' );
  fprintf ( 1, '\n' );

  for i = 0 : 10

    x = gamma_sample ( a, b, c );

    cdf = gamma_cdf ( x, a, b, c );

    pdf = gamma_pdf ( x, a, b, c );

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

  end

  return
end
