function planck_pdf_test ( )

%*****************************************************************************80
%
%% PLANCK_PDF_TEST tests PLANCK_PDF.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    12 April 2016
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'PLANCK_PDF_TEST\n' );
  fprintf ( 1, '  PLANCK_PDF evaluates the Planck PDF.\n' );

  a = 2.0;
  b = 3.0;

  if ( ~ planck_check ( a, b ) )
    fprintf ( 1, '\n' );
    fprintf ( 1, 'PLANCK_PDF_TEST - Fatal error!\n' );
    fprintf ( 1, '  The parameters are not legal.\n' );
    return;
  end

  fprintf ( 1, '\n' );
  fprintf ( 1, '  PDF parameter A = %g\n', a );
  fprintf ( 1, '  PDF parameter B = %g\n', b );

  seed = 123456789;

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

  for i = 1 : 10

    [ x, seed ] = planck_sample ( a, b, seed );

    pdf = planck_pdf ( x, a, b );

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

  end

  return
end
