function cdf = laplace_my_cdf ( x, a, b )

%*****************************************************************************80
%
%% laplace_my_cdf() evaluates the Laplace CDF.
%
%  Discussion:
%
%    Had to insert the idiotic "_my" in the name because Octave has a
%    similarly named function in its automatically installed package.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    13 September 2004
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real X, the argument of the CDF.
%
%    real A, B, the parameters of the PDF.
%    0.0 < B.
%
%  Output:
%
%    real CDF, the value of the PDF.
%
  y = ( x - a ) / b;

  if ( x <= a )
    cdf = 0.5 * exp ( y );
  else
    cdf = 1.0 - 0.5 * exp ( - y );
  end

  return
end
