function hypergeometric_cdf_test ( )

%*****************************************************************************80
%
%% hypergeometric_cdf_test() tests hypergeometric_cdf().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    08 April 2016
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'HYPERGEOMETRIC_CDF_TEST():\n' );
  fprintf ( 1, '  HYPERGEOMETRIC_CDF() evaluates the Hypergeometric CDF.\n' );
  fprintf ( 1, '  HYPERGEOMETRIC_PDF() evaluates the Hypergeometric PDF.\n' );

  x = 7;

  n = 10;
  m = 7;
  l = 100;

  check = hypergeometric_check ( n, m, l );

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

  pdf = hypergeometric_pdf ( x, n, m, l );

  cdf = hypergeometric_cdf ( x, n, m, l );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  PDF argument X =                %6d\n', x );
  fprintf ( 1, '  Total number of balls =         %6d\n', l );
  fprintf ( 1, '  Number of white balls =         %6d\n', m );
  fprintf ( 1, '  Number of balls taken =         %6d\n', n );
  fprintf ( 1, '  PDF value =                   = %14g\n', pdf );
  fprintf ( 1, '  CDF value =                   = %14g\n', cdf );

  return
end
