function x = sech_cdf_inv ( cdf, a, b )

%*****************************************************************************80
%
%% sech_cdf_inv() inverts the Hyperbolic Secant CDF.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    12 January 2021
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real CDF, the value of the CDF.
%
%    real A, B, the parameters of the PDF.
%    0.0 < B.
%
%  Output:
%
%    real X, the corresponding argument of the CDF.
%
  if ( cdf <= 0.0 )
    x = - Inf;
  elseif ( cdf < 1.0 )
    x = a + b * log ( tan ( 0.5 * pi * cdf ) );
  elseif ( 1.0 <= cdf )
    x = inf;
  end

  return
end
