function x = benford_sample ( )

%*****************************************************************************80
%
%% benford_sample() samples the Benford PDF.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    11 November 2022
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Frank Benford,
%    The Law of Anomalous Numbers,
%    Proceedings of the American Philosophical Society,
%    Volume 78, pages 551-572, 1938.
%
%    Ted Hill,
%    The First Digit Phenomenon,
%    American Scientist,
%    Volume 86, July/August 1998, pages 358 - 363.
%
%    Ralph Raimi,
%    The Peculiar Distribution of First Digits,
%    Scientific American,
%    December 1969, pages 109-119.
%
%  Output:
%
%    real X, a sample of the PDF.
%
  cdf = rand ( 1, 1 );

  x = benford_cdf_inv ( cdf );

  return
end
