function value = r8_gamma_01_pdf ( alpha, rval )

%*****************************************************************************80
%
%% r8_gamma_01_pdf() evaluates the PDF of a standard gamma distribution.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    11 January 2021
%
%  Author:
%
%    John Burkardt.
%
%  Input:
%
%    real ALPHA, the shape parameter.
%    0.0 < ALPHA.
%
%    real RVAL, the point where the PDF is evaluated.
%
%  Output:
%
%    real VALUE, the value of the PDF at RVAL.
%
  if ( alpha <= 0.0 )
    fprintf ( 1, '\n' );
    fprintf ( 1, 'R8_GAMMA_01_PDF - Fatal error!\n' );
    fprintf ( 1, '  Parameter ALPHA is not positive.\n' );
    error ( 'R8_GAMMA_01_PDF - Fatal error!' );
  end

  if ( rval <= 0.0 )

    value = 0.0;

  else

    temp = ( alpha - 1.0 ) * log ( rval ) - rval - gammaln ( alpha );

    value = exp ( temp );

  end

  return   
end
