]>
If Cut/Copy and Paste fails, then click here for download.
double aitkenneville (unsigned int n, double *xi, double *yi, double xo, double *w) { /* xi[n], yi[n], w[n + n] */ unsigned int i, j; for (i = 0; i < n; i++) { w[n - (i + 1)] = yi[i]; w[n + n - (i + 1)] = xi[i]; } for (i = 1; i < n; i++) for (j = i; j < n; j++) w[j - i] += (w[1 + j - i] - w[j - i]) * (xo - w[n + j - i]) / (w[n + j] - w[n + j - i]); return (w[0]); }