function yval = r8poly_ant_val ( n, poly_cof, xval )

%*****************************************************************************80
%
%% r8poly_ant_val() evaluates the antiderivative of a polynomial in standard form.
%
%  Discussion:
%
%    The constant term of the antiderivative is taken to be zero.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    06 September 2004
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N, the order of the polynomial.
%
%    real POLY_COF(1:N), the polynomial coefficients.
%    POLY_COF(1) is the constant term, and POLY_COF(N) is the coefficient of
%    X^(N-1).
%
%    real XVAL, the point where the antiderivative is to be
%    evaluated.
%
%  Output:
%
%    real YVAL, the value of the antiderivative of
%    the polynomial at XVAL.
%
  yval = 0.0;

  for i = n : -1 : 1
    yval = ( yval + poly_cof(i) / i ) * xval;
  end

  return
end
