public double evaluate(double x){
                double y = 0.0;
                if(this.deg==0){
                        y = this.coeff[0];
                }
                else{
                        y = this.coeff[this.deg];
                        for(int i=this.deg-1; i>=0; i--){
                                y = y*x + this.coeff[i];
                        }
                }
                return y;
        }