]> 1D Chebyshev economization, the derivative of the function

1D Chebyshev economization, the derivative of the function


If Cut/Copy and Paste fails, then click here for download.


double approxd (int n, double *c, double x)
{
  double y, x2, u0, u1, wu, u2, cu;
  int i;
  y = 0.0; x2 = 2.0 * x;
  u0 = -1.0; u1 = -x2;
  wu = -1.0;
  for (i = 0; i < n; i++) {
    u2 = u1; u1 = u0; u0 = u1 * x2 - u2;
    cu = c[i] * u0; wu += 1.0; y += cu * wu;
    }
  return (y);
  }

Thu, 07 Aug 2014 00:56:57 +0200

Stephan K.H. Seidl