// peval.java Horners method for evaluating a polynomial // eval is function that computes Horners method public class peval { public peval() { double y; double c[] = new double[11]; double r[] = new double[11]; System.out.println("peval.java running"); // test peval by generation roots of a polynomial, // then generating the polynomial, then evaluating for(int n=3; n<11; n++) // n is degree of polynomial { System.out.println(" "); System.out.println("y = c[0] + c[1]*x + c[2]*x^2 +...+ c[n]*x^n, for n=" +n); System.out.println("roots are:"); r[0] = 0.1; System.out.println("r[0]="+r[0]); r[1] = 2.5; System.out.println("r[1]="+r[1]); for(int i=2; i