function value = r8poly_value ( m, c, x )

%*****************************************************************************80
%
%% r8poly_value() evaluates a polynomial naively.
%
%  Discussion:
%
%    The polynomial 
%
%      p(x) = c0 + c1 * x + c2 * x^2 + ... + cm * x^m
%
%    is to be evaluated at the value X.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    21 August 2017
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer M, the degree.
%
%    real C(M+1), the polynomial coefficients.  
%    C(I) is the coefficient of X^(I-1).
%
%    real X, the evaluation point.
%
%  Output:
%
%    real VALUE, the polynomial value.
%
  value = c(1);
  xi = 1.0;
  for i = 1 : m
    xi = xi * x;
    value = value + c(i+1) * xi;
  end

  return
end
