function x = r8_normal_01 ( )

%*****************************************************************************80
%
%% r8_normal_01() samples the standard normal probability distribution.
%
%  Discussion:
%
%    The standard normal probability distribution function (PDF) has
%    mean 0 and standard deviation 1.
%
%    The Box-Muller method is used.
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    04 November 2021
%
%  Author:
%
%    John Burkardt
%
%  Output:
%
%    real X, a sample of the standard normal PDF.
%
  r1 = rand ( );
  r2 = rand ( );

  x = sqrt ( -2.0 * log ( r1 ) ) * cos ( 2.0 * pi * r2 );

  return
end
