Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static double horner(double x, double y, double[] z){
- double[] b = new double[z.length-1];
- for (int i=(b.length-1); i>=0; i--)b[i]=z[i];
- if(b.length-1<0) return y;
- double c =(y*x)+b[b.length-1];
- return horner(x, c, b);
- }
Add Comment
Please, Sign In to add comment