function x = normal_01_sample ( )

%*****************************************************************************80
%
%% normal_01_sample() 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:
%
%    26 August 2013
%
%  Author:
%
%    John Burkardt
%
%  Output:
%
%    real X, a sample of the standard normal PDF.
%
  r1 = rand ( 1, 1 );
  r2 = rand ( 1, 1 );

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

  return
end
