def polyh(c, x):
  """
  polynomial eval using Horner method (high order)
  Warning: the coefficients are ordered from high powers down to the const.
  """
  n = len(c)
  p = 0.0
  for i in range(0, n-1):
    p = (p + c[i])*x
  p += c[n-1]
  return p