P1(JI,IN1)=DLOG(X(J))+ACT(J)-DLOG(X(IV))+SU(J)
P1(JI,L)=-1./X(IV)
P1(L,JI)=-1./X(IV)*PHI
SUM=SUM+EX(J)
3900
CONTINUE
P1(L,L)=SUM*PHI/X(IV)
P1(L,IN1)=SU(NL)-SUM*PHI
DO 4000 I=1,ICLOS
K=L+I
II=JCLOS(I)
P1(K,K)=0.
P1(K,IN1)=A(II,N1)
DO 4001 J=IP1,NL
P1(K,IN1)=P1(K,IN1)-A(II,J)*X(J)
IJ=J-IP
P1(K,IJ)=-A(II,J)
P1(IJ,K)=-A(II,J)
4001
CONTINUE
4000
CONTINUE
CALL GG (1,IN,IN1)
DO 4100 I=1,ICLOS
K=L+I
II=JCLOS(I)
YLI=G(II)-P1(K,IN1)/DELL
XBS=DABS(YLI-G(II))
IF(XBS.LE.EPS) ISL=ISL+1
G(II)=YLI
4100
CONTINUE
DO 4200 I=1,L
J=I+IP
YLI=X(J)-P1(I,IN1)/DELL
IF(YLI.LE.1.D-10) YLI=1.D-6
XBS=DABS((YLI-X(J))/X(J))
IF(XBS.LE.EPS) ISL=ISL+1
X(J)=YLI
4200
CONTINUE
IF(X(NL).LE.1.D-3) X(NL)=1.D-3
IF(ISL.LT.IN) GO TO 5
C..
400
XX=0.
IMIN=0
DO 3100 I=1,IOPEN
JO=JOPEN(I)
SUM=0.
DO 3101 J=IP1,NL
SUM=SUM+A(JO,J)*X(J)
3101
CONTINUE
34