function value = r8_softplus ( x )

%*****************************************************************************80
%
%% r8_softplus() evaluates the softplus function of an R8.
%
%  Discussion:
%
%    An R8 is a double precision real value.
%
%    The softplus function is a smoothed (differentiable) version of max(x,0.0).
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    07 September 2018
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real X, the argument.
%
%  Output:
%
%    real VALUE, the function value.
%
  if ( x <= -36.841 )
    value = 0.0;
  elseif ( +36.841 <= x )
    value = x;
  else
    value = log ( 1.0 + exp ( x ) );
  end

  return
end
