10 double P1,P2,P3,PP,Z,Z1,ZM1,ZP1,HELP,ZH;
11 const double EPS = 3.e-14;
15 for(
int I1 = 1; I1 <= M; I1++) {
17 Z = cos(3.141592654E0 * (I1-.25E0) / (KNUM +.5E0));
21 for(
int L=1; L <= KNUM; L++) {
24 P1=((2.E0*L-1.E0)*Z*P2-(L-1.E0)*P3)/L;
26 PP=KNUM*(Z*P1-P2)/(Z*Z-1.E0);
29 }
while (fabs(Z-Z1) > EPS);
33 X(I1-1) = ZM1 * X2 + ZP1 * X1;
34 X(I2-1) = ZP1 * X2 + ZM1 * X1;
35 HELP = 2.E0/((1.E0-Z*Z)*PP*PP);
void rf_gauleg(AutoDerivative< double > X1, AutoDerivative< double > X2, blitz::Array< AutoDerivative< double >, 1 > &X, blitz::Array< AutoDerivative< double >, 1 > &W, int KNUM)