function yval = r8poly_deriv_value ( d, c, xval )

%*****************************************************************************80
%
%% r8poly_deriv_value() evaluates the derivative of a polynomial in standard form.
%
%  Discussion:
%
%    A polynomial in standard form, with coefficients POLY_COF(*),
%    may be written:
%
%      P(X) = C(1)
%           + C(2) * X
%           ...
%           + C(D+1) * X^(D)
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    17 November 2019
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer D, the degree of the polynomial.
%
%    real C(1:D+1), the polynomial coefficients.
%    C(1) is the constant term, and C(N) is the coefficient of X^(N-1).
%
%    real XVAL, a value where the derivative of the
%    polynomial is to be evaluated.
%
%  Output:
%
%    real YVAL, the value of the derivative of the
%    polynomial at XVAL.
%
  yval = d * c(d+1);

  for i = d : -1 : 2
    yval = yval * xval + ( i - 1 ) * c(i);
  end

  return
end
