1 *** COPIED FROM 'A0568.NEW.FORT(GAUSS)' ON 1989.10.1
2 SUBROUTINE GAUSS(A,W,K)
4 C A; COSINE OF COLATITUDE
6 C K; ORDER OF LEGENDRE FUNCTIONS
8 IMPLICIT REAL*8(A-H,O-Z)
13 C=(1.E0-(2.E0/3.14159265358979E0)**2)*0.25E0
18 XZ=COS(A(IS)/SQRT((FK+0.5E0)**2+C))
23 IF(ITER.GT.10) GO TO 70
26 PK=((2.E0*FN-1.E0)*XZ*PKM1-(FN-1.0)*PKM2)/FN
30 PKMRK=(FK*(PKM1-XZ*PK))/(1.E0-XZ**2)
34 IF(AVSP.GT.ESP) GO TO 10
36 W(IS)=(2.E0*(1.E0-XZ**2))/(FK*PKM1)**2
38 IF(K.EQ.KK*2) GO TO 50
43 40 PK=PK*FN**2/(FN-1.E0)**2
52 6000 FORMAT(//5X,14HERROR IN GAUAW//)