Trailing-Edge
-
PDP-10 Archives
-
decuslib20-01
-
decus/20-0025/orthp.for
There is 1 other file named orthp.for in the archive. Click here to see a list.
01000 FUNCTION ORTHP(IND,ZARG,NARG)
01010 C EVALUATION OF ONE OF FOUR TYPES OF
01011 C ORTHOGONAL POLYNOMIALS
01020 DIMENSION A(3)
01030 1 Z = ZARG
01040 NPL1 = NARG + 1
01050 101 DO 191 J1 = 1,NPL1
01060 IF(J1-2)111,111,161
01070 111 GO TO (121,141),J1
01080 121 A(1) = 1.
01090 GO TO 191
01100 141 A(2) = A(1)
01110 GO TO (151,152,153,151),IND
01120 151 A(1)=Z
01130 GO TO 191
01140 152 A(1) = 1. - Z
01150 GO TO 191
01160 153 A(1)=Z+Z
01170 GO TO 191
01180 161 A(3)=A(2)
01190 A(2)=A(1)
01200 AN=J1-2
01210 GO TO (181,182,183,184),IND
01220 C LEGENDRE POLYNOMIAL
01230 181 A(1)=((2.*AN+1.)*Z*A(2)-AN*A(3))/(AN+1.)
01240 GO TO 191
01250 C LAGUERRE POLYNOMIAL
01260 182 A(1)=((1.+2.*AN-Z)*A(2)-AN*A(3))/(AN+1.)
01270 GO TO 191
01280 C HERMITE POLYNOMIAL
01290 183 A(1)=2.*(Z*A(2)-AN*A(3))
01300 GO TO 191
01310 C CHEBYCHEV POLYNOMIAL
01320 184 A(1)=2.*Z*A(2)-A(3)
01330 191 CONTINUE
01340 ORTHP = A(1)
01350 RETURN
01360 END