double horner(double *coeffint ndouble x){
       int i;
       double p;
       p=coeff[n];
       for (i=n-1i>=0i--)
           p = p*xcoeff[i];
       return p;
// horner