function value = gaussian_antideriv ( mu, sigma, x )

%*****************************************************************************80
%
%% gaussian_antideriv() evaluates the antiderivative of a Gaussian function.
%
%  Discussion:
%
%    g_anti(mu,sigma;x) = 1/sigma/sqrt(2*pi) * 
%      integral ( 0 <= z <= x ) exp ( - 0.5 * (( z - mu )/sigma)^2 ) dz
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    02 July 2025
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real MU, the mean.
%
%    real SIGMA: the standard deviation.
%
%    real X(M): evaluation points.
%
%  Output:
%
%    real VALUE: the values of the antiderivative of the Gaussian function.
%
  z1 =   mu       / sqrt ( 2.0 ) / sigma;
  z2 = ( mu - x ) / sqrt ( 2.0 ) / sigma;

  value = erf ( z1 ) - erf ( z2 );
  
  return
end

