function x = reciprocal_sample ( a, b )

%*****************************************************************************80
%
%% reciprocal_sample() samples the Reciprocal PDF.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    20 September 2004
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real A, B, the parameters of the PDF.
%    0.0 < A <= B.
%
%  Output:
%
%    real X, a sample of the PDF.
%
  cdf = rand ( 1, 1 );

  x = b^cdf / a^( cdf - 1.0 );

  return
end
