function truncated_normal_a_pdf_test ( )

%*****************************************************************************80
%
%% truncated_normal_a_pdf_test() tests truncated_normal_a_pdf();
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 September 2013
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'truncated_normal_a_pdf_test():\n' );
  fprintf ( 1, '  truncated_normal_a_pdf() evaluates the lower Truncated Normal PDF.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  The "parent" normal distribution has\n' );
  fprintf ( 1, '    mean = mu\n' );
  fprintf ( 1, '    standard deviation = sigma\n' );
  fprintf ( 1, '  The parent distribution is truncated to\n' );
  fprintf ( 1, '  the interval [a,+oo)\n' );

  fprintf ( 1, '\n' );
  fprintf ( 1, '                                                 Stored         Computed\n' );
  fprintf ( 1, '       X        Mu         S         A             PDF             PDF\n' );
  fprintf ( 1, '\n');

  n_data = 0;

  while ( true )

    [ n_data, mu, sigma, a, x, pdf1 ] ...
      = truncated_normal_a_pdf_values ( n_data );

    if ( n_data == 0 )
      break
    end

    pdf2 = truncated_normal_a_pdf ( x, mu, sigma, a );

    fprintf( 1, '  %8.1f  %8.1f  %8.1f  %8.1f  %14g  %14g\n', ...
      x, mu, sigma, a, pdf1, pdf2 );

  end

  return
end
