%N valpol %F $MIR/src/subs/lspoly.for
%D Evaluate powers-of-x polynomial at the point x
%P mchw
%: polynomials
%B
      real function valpol(x,coeff,n)

      implicit none
      integer n
      real x, coeff(n)

  Evaluate powers-of-x polynomial at the point x.
  polynomial order is n-1.
       Input:
        x       point to evaluate polynomial at
        n       length of coeff array
        coeff   polynomial coefficients for x**(0..n-1)
       Output:
        valpol  value of polynomial

       Warning: If COEFF are the coefficients as returned by LSPOLY,
       the input value X needs to be relative to it's first point X(1).
       See LSPOLY.
