1 SUBROUTINE GAUSS(A,W,K)
3 C A; COSINE OF COLATITUDE
5 C K; ORDER OF LEGENDRE FUNCTIONS
7 IMPLICIT REAL*8(A-H,O-Z)
12 C=(1.E0-(2.E0/pi)**2)*0.25E0
17 XZ=COS(A(IS)/SQRT((FK+0.5E0)**2+C))
22 IF(ITER.GT.10) GO TO 70
25 PK=((2.E0*FN-1.E0)*XZ*PKM1-(FN-1.0)*PKM2)/FN
29 PKMRK=(FK*(PKM1-XZ*PK))/(1.E0-XZ**2)
33 IF(AVSP.GT.ESP) GO TO 10
35 W(IS)=(2.E0*(1.E0-XZ**2))/(FK*PKM1)**2
37 IF(K.EQ.KK*2) GO TO 50
42 40 PK=PK*FN**2/(FN-1.E0)**2
51 6000 FORMAT(//5X,14HERROR IN GAUAW//)