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 GNU LGPL license.
%
%  Modified:
%
%    21 August 2017
%
%  Author:
%
%    John Burkardt
%
%  Parameters:
%
%    Input, integer M, the degree.
%
%    Input, real C(M+1), the polynomial coefficients.  
%    C(I) is the coefficient of X^(I-1).
%
%    Input, 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
