C ===  Derivating with respect to: 
C     A(1,1) A(1,2) A(1,3) A(1,4) A(2,1) A(2,2) A(2,3) A(2,4) A44 B(1) B(2)
C     C(1,1) C(1,2) C(1,3) C(1,4) C(2,1) C(2,2) C(2,3) C44                 
C
      SUBROUTINE VALUE(A,B,C,A44,C44,FN,INF)
      IMPLICIT REAL*8(A-H,O-Z)
      REAL*4 X
      DIMENSION A(2,4),B(2),C(2,4)
C ****** SUBST. MAX. NUMBER OF OBSERVATIONS ******
      COMMON X(13,1800),NOBS,B3
      COMMON/TRAPCODE/ITR
      COMMON /VRNCS/ W1,W2,W3
      ITR=0
C -- COMPUTE EIGENVALUES AND EIGENVECTORS -
      DET_1=A(2,2)
      DET_2=-A(2,1)
      DET_5=-A(1,2)
      DET_6=A(1,1)
      DET=A(1,1)*A(2,2)-A(1,2)*A(2,1)
      HFTRA_1=0.5
C*** WARNING: New identifier HFTRA_1 too long ***
      HFTRA_6=0.5
C*** WARNING: New identifier HFTRA_6 too long ***
      HFTRA=0.5*(A(1,1)+A(2,2))
      DISCR_1=2*HFTRA**(2-1)*HFTRA_1-DET_1
C*** WARNING: New identifier DISCR_1 too long ***
      DISCR_2=-DET_2
C*** WARNING: New identifier DISCR_2 too long ***
      DISCR_5=-DET_5
C*** WARNING: New identifier DISCR_5 too long ***
      DISCR_6=2*HFTRA**(2-1)*HFTRA_6-DET_6
C*** WARNING: New identifier DISCR_6 too long ***
      DISCR=HFTRA**2-DET
      IF(DISCR.GT.0.) GO TO 1
         WRITE(3,11)
   11    FORMAT(' COMPLEX EIGENVALUES')
         INF=1
         RETURN
    1 IF(HFTRA.lt.0.) goto 91
      XL1_1=HFTRA_1+DISCR_1/2./DSQRT(DISCR)
      XL1_2=DISCR_2/2./DSQRT(DISCR)
      XL1_5=DISCR_5/2./DSQRT(DISCR)
      XL1_6=HFTRA_6+DISCR_6/2./DSQRT(DISCR)
      XL1=HFTRA+DSQRT(DISCR)
 91   continue      
      IF(HFTRA.ge.0.) goto 92
      XL1_1=HFTRA_1-DISCR_1/2./DSQRT(DISCR)
      XL1_2=-DISCR_2/2./DSQRT(DISCR)
      XL1_5=-DISCR_5/2./DSQRT(DISCR)
      XL1_6=HFTRA_6-DISCR_6/2./DSQRT(DISCR)
      XL1=HFTRA-DSQRT(DISCR)
 92   continue
      XL2_1=(DET_1-DET/XL1*XL1_1)/XL1
      XL2_2=(DET_2-DET/XL1*XL1_2)/XL1
      XL2_5=(DET_5-DET/XL1*XL1_5)/XL1
      XL2_6=(DET_6-DET/XL1*XL1_6)/XL1
      XL2=DET/XL1
      P11_1=XL1_1
      P11_2=XL1_2
      P11_5=XL1_5
      P11_6=XL1_6-1.
      P11=XL1-A(2,2)
      P12_2=1.
      P12=A(1,2)
      P13_1=(A(1,3)*P11_1-(A(1,3)*P11+A(2,3)*P12)/(XL1+1.)*XL1_1)/(XL1+1
     :.)
      P13_2=(A(1,3)*P11_2+A(2,3)*P12_2-(A(1,3)*P11+A(2,3)*P12)/(XL1+1.)*
     :XL1_2)/(XL1+1.)
      P13_3=P11/(XL1+1.)
      P13_5=(A(1,3)*P11_5-(A(1,3)*P11+A(2,3)*P12)/(XL1+1.)*XL1_5)/(XL1+1
     :.)
      P13_6=(A(1,3)*P11_6-(A(1,3)*P11+A(2,3)*P12)/(XL1+1.)*XL1_6)/(XL1+1
     :.)
      P13_7=P12/(XL1+1.)
      P13=(A(1,3)*P11+A(2,3)*P12)/(XL1+1.)
      P14_1=(A(1,4)*P11_1-(A(1,4)*P11+A(2,4)*P12)/(XL1-A44)*XL1_1)/(XL1-
     :A44)
      P14_2=(A(1,4)*P11_2+A(2,4)*P12_2-(A(1,4)*P11+A(2,4)*P12)/(XL1-A44)
     :*XL1_2)/(XL1-A44)
      P14_4=P11/(XL1-A44)
      P14_5=(A(1,4)*P11_5-(A(1,4)*P11+A(2,4)*P12)/(XL1-A44)*XL1_5)/(XL1-
     :A44)
      P14_6=(A(1,4)*P11_6-(A(1,4)*P11+A(2,4)*P12)/(XL1-A44)*XL1_6)/(XL1-
     :A44)
      P14_8=P12/(XL1-A44)
      P14_9=(-(A(1,4)*P11+A(2,4)*P12)/(XL1-A44)*(-1.))/(XL1-A44)
      P14=(A(1,4)*P11+A(2,4)*P12)/(XL1-A44)
      P21_5=1.
      P21=A(2,1)
      P22_1=XL2_1-1.
      P22_2=XL2_2
      P22_5=XL2_5
      P22_6=XL2_6
      P22=XL2-A(1,1)
      P23_1=(A(2,3)*P22_1-(A(1,3)*P21+A(2,3)*P22)/(XL2+1.)*XL2_1)/(XL2+1
     :.)
      P23_2=(A(2,3)*P22_2-(A(1,3)*P21+A(2,3)*P22)/(XL2+1.)*XL2_2)/(XL2+1
     :.)
      P23_3=P21/(XL2+1.)
      P23_5=(A(1,3)*P21_5+A(2,3)*P22_5-(A(1,3)*P21+A(2,3)*P22)/(XL2+1.)*
     :XL2_5)/(XL2+1.)
      P23_6=(A(2,3)*P22_6-(A(1,3)*P21+A(2,3)*P22)/(XL2+1.)*XL2_6)/(XL2+1
     :.)
      P23_7=P22/(XL2+1.)
      P23=(A(1,3)*P21+A(2,3)*P22)/(XL2+1.)
      P24_1=(A(2,4)*P22_1-(A(1,4)*P21+A(2,4)*P22)/(XL2-A44)*XL2_1)/(XL2-
     :A44)
      P24_2=(A(2,4)*P22_2-(A(1,4)*P21+A(2,4)*P22)/(XL2-A44)*XL2_2)/(XL2-
     :A44)
      P24_4=P21/(XL2-A44)
      P24_5=(A(1,4)*P21_5+A(2,4)*P22_5-(A(1,4)*P21+A(2,4)*P22)/(XL2-A44)
     :*XL2_5)/(XL2-A44)
      P24_6=(A(2,4)*P22_6-(A(1,4)*P21+A(2,4)*P22)/(XL2-A44)*XL2_6)/(XL2-
     :A44)
      P24_8=P22/(XL2-A44)
      P24_9=(-(A(1,4)*P21+A(2,4)*P22)/(XL2-A44)*(-1.))/(XL2-A44)
      P24=(A(1,4)*P21+A(2,4)*P22)/(XL2-A44)
C -- COMPUTE LOG-LIKELIHOOD -
      DETC_12=C(2,2)
C*** WARNING: New identifier DETC_12 too long ***
      DETC_13=-C(2,1)
C*** WARNING: New identifier DETC_13 too long ***
      DETC_16=-C(1,2)
C*** WARNING: New identifier DETC_16 too long ***
      DETC_17=C(1,1)
C*** WARNING: New identifier DETC_17 too long ***
      DETC=C(1,1)*C(2,2)-C(1,2)*C(2,1)
      IF(ABS(DETC).GT.0.) GO TO 3
         WRITE(3,33)
   33    FORMAT(' C IS SINGULAR')
         INF=1
         RETURN
 *** Use CONTINUE for label ***
      DETP_1=P11_1*P22+P11*P22_1
      DETP_2=P11_2*P22+P11*P22_2-P12_2*P21
      DETP_5=P11_5*P22+P11*P22_5-P12*P21_5
      DETP_6=P11_6*P22+P11*P22_6
    3 DETP=P11*P22-P12*P21
      IF(ABS(DETP).GT.0.) GO TO 4
         WRITE(3,44)
   44    FORMAT(' P IS SINGULAR')
         INF=1
         RETURN
    4 continue
      FN_1=-DSIGN(1.,DETC*DETP)*DETC*DETP_1/DABS(DETC*DETP)
      FN_2=-DSIGN(1.,DETC*DETP)*DETC*DETP_2/DABS(DETC*DETP)
      FN_3=0.
      FN_4=0.
      FN_5=-DSIGN(1.,DETC*DETP)*DETC*DETP_5/DABS(DETC*DETP)
      FN_6=-DSIGN(1.,DETC*DETP)*DETC*DETP_6/DABS(DETC*DETP)
      FN_7=0.
      FN_8=0.
      FN_9=0.
      FN_10=0.
      FN_11=0.
      FN_12=-DSIGN(1.,DETC*DETP)*DETC_12*DETP/DABS(DETC*DETP)
      FN_13=-DSIGN(1.,DETC*DETP)*DETC_13*DETP/DABS(DETC*DETP)
      FN_14=0.
      FN_15=0.
      FN_16=-DSIGN(1.,DETC*DETP)*DETC_16*DETP/DABS(DETC*DETP)
      FN_17=-DSIGN(1.,DETC*DETP)*DETC_17*DETP/DABS(DETC*DETP)
      FN_18=0.
      FN_19=0.
C*** WARNING: Statement interpreted as
C***  FN=-DLOG(DABS(DETC*DETP))
      FN=-DLOG(ABS(DETC*DETP))
      W1_1=0.
      W1_2=0.
      W1_3=0.
      W1_4=0.
      W1_5=0.
      W1_6=0.
      W1_7=0.
      W1_8=0.
      W1_9=0.
      W1_10=0.
      W1_11=0.
      W1_12=0.
      W1_13=0.
      W1_14=0.
      W1_15=0.
      W1_16=0.
      W1_17=0.
      W1_18=0.
      W1_19=0.
      W1=0.
      W2_1=0.
      W2_2=0.
      W2_3=0.
      W2_4=0.
      W2_5=0.
      W2_6=0.
      W2_7=0.
      W2_8=0.
      W2_9=0.
      W2_10=0.
      W2_11=0.
      W2_12=0.
      W2_13=0.
      W2_14=0.
      W2_15=0.
      W2_16=0.
      W2_17=0.
      W2_18=0.
      W2_19=0.
      W2=0.
      W3=0.
      PB1_1=P11_1*B(1)+P13_1*B3-P14_1*A44
      PB1_2=P11_2*B(1)+P12_2*B(2)+P13_2*B3-P14_2*A44
      PB1_3=P13_3*B3
      PB1_4=-P14_4*A44
      PB1_5=P11_5*B(1)+P13_5*B3-P14_5*A44
      PB1_6=P11_6*B(1)+P13_6*B3-P14_6*A44
      PB1_7=P13_7*B3
      PB1_8=-P14_8*A44
      PB1_9=-P14_9*A44-P14
      PB1_10=P11
      PB1_11=P12
      PB1=P11*B(1)+P12*B(2)+P13*B3-P14*A44
      PB2_1=P22_1*B(2)+P23_1*B3-P24_1*A44
      PB2_2=P22_2*B(2)+P23_2*B3-P24_2*A44
      PB2_3=P23_3*B3
      PB2_4=-P24_4*A44
      PB2_5=P21_5*B(1)+P22_5*B(2)+P23_5*B3-P24_5*A44
      PB2_6=P22_6*B(2)+P23_6*B3-P24_6*A44
      PB2_7=P23_7*B3
      PB2_8=-P24_8*A44
      PB2_9=-P24_9*A44-P24
      PB2_10=P21
      PB2_11=P22
      PB2=P21*B(1)+P22*B(2)+P23*B3-P24*A44
C -- LOOP BEGINS -
      DO 10 I=1,NOBS
      IF(ITR.EQ.1) GO TO 2
      Y04_9=-(1.0-DEXP(X(11,I)*C44))*DEXP(X(12,I)*(-A44))*X(12,I)*(-1.)
      Y04_19=-(-DEXP(X(11,I)*C44)*X(11,I))*DEXP(X(12,I)*(-A44))
      Y04=1.0-(1.0-DEXP(X(11,I)*C44))*DEXP(X(12,I)*(-A44))
      Y4_9=-(1.0-DEXP(X(11,I)*C44))*DEXP(X(13,I)*(-A44))*X(13,I)*(-1.)
      Y4_19=-(-DEXP(X(11,I)*C44)*X(11,I))*DEXP(X(13,I)*(-A44))
      Y4=1.0-(1.0-DEXP(X(11,I)*C44))*DEXP(X(13,I)*(-A44))
      ALX04_9=Y04_9/Y04/C44
C*** WARNING: New identifier ALX04_9 too long ***
      ALX04_19=(Y04_19/Y04-DLOG(Y04)/C44)/C44
C*** WARNING: New identifier ALX04_19 too long ***
      ALX04=DLOG(Y04)/C44
      ALX4_9=Y4_9/Y4/C44
      ALX4_19=(Y4_19/Y4-DLOG(Y4)/C44)/C44
C*** WARNING: New identifier ALX4_19 too long ***
      ALX4=DLOG(Y4)/C44
      ALXC1_9=C(1,4)*ALX4_9
C*** WARNING: New identifier ALXC1_9 too long ***
      ALXC1_12=X(1,I)
C*** WARNING: New identifier ALXC1_12 too long ***
      ALXC1_13=X(2,I)
C*** WARNING: New identifier ALXC1_13 too long ***
      ALXC1_14=X(3,I)
C*** WARNING: New identifier ALXC1_14 too long ***
      ALXC1_15=ALX4
C*** WARNING: New identifier ALXC1_15 too long ***
      ALXC1_19=C(1,4)*ALX4_19
C*** WARNING: New identifier ALXC1_19 too long ***
      ALXC1=C(1,1)*X(1,I)+C(1,2)*X(2,I)+C(1,3)*X(3,I)+C(1,4)*ALX4
      ALXC2_9=C(2,4)*ALX4_9
C*** WARNING: New identifier ALXC2_9 too long ***
      ALXC2_16=X(1,I)
C*** WARNING: New identifier ALXC2_16 too long ***
      ALXC2_17=X(2,I)
C*** WARNING: New identifier ALXC2_17 too long ***
      ALXC2_18=X(3,I)
C*** WARNING: New identifier ALXC2_18 too long ***
      ALXC2_19=C(2,4)*ALX4_19
C*** WARNING: New identifier ALXC2_19 too long ***
      ALXC2=C(2,1)*X(1,I)+C(2,2)*X(2,I)+C(2,3)*X(3,I)+C(2,4)*ALX4
      Y1_9=DEXP(ALXC1)*ALXC1_9
      Y1_12=DEXP(ALXC1)*ALXC1_12
      Y1_13=DEXP(ALXC1)*ALXC1_13
      Y1_14=DEXP(ALXC1)*ALXC1_14
      Y1_15=DEXP(ALXC1)*ALXC1_15
      Y1_19=DEXP(ALXC1)*ALXC1_19
      Y1=DEXP(ALXC1)
      Y2_9=DEXP(ALXC2)*ALXC2_9
      Y2_16=DEXP(ALXC2)*ALXC2_16
      Y2_17=DEXP(ALXC2)*ALXC2_17
      Y2_18=DEXP(ALXC2)*ALXC2_18
      Y2_19=DEXP(ALXC2)*ALXC2_19
      Y2=DEXP(ALXC2)
      Y01_9=DEXP(C(1,1)*X(4,I)+C(1,2)*X(5,I)+C(1,3)*X(6,I)+C(1,4)*ALX04)
     :*C(1,4)*ALX04_9
      Y01_12=DEXP(C(1,1)*X(4,I)+C(1,2)*X(5,I)+C(1,3)*X(6,I)+C(1,4)*ALX04
     :)*X(4,I)
      Y01_13=DEXP(C(1,1)*X(4,I)+C(1,2)*X(5,I)+C(1,3)*X(6,I)+C(1,4)*ALX04
     :)*X(5,I)
      Y01_14=DEXP(C(1,1)*X(4,I)+C(1,2)*X(5,I)+C(1,3)*X(6,I)+C(1,4)*ALX04
     :)*X(6,I)
      Y01_15=DEXP(C(1,1)*X(4,I)+C(1,2)*X(5,I)+C(1,3)*X(6,I)+C(1,4)*ALX04
     :)*ALX04
      Y01_19=DEXP(C(1,1)*X(4,I)+C(1,2)*X(5,I)+C(1,3)*X(6,I)+C(1,4)*ALX04
     :)*C(1,4)*ALX04_19
      Y01=DEXP(C(1,1)*X(4,I)+C(1,2)*X(5,I)+C(1,3)*X(6,I)+C(1,4)*ALX04)
      Y02_9=DEXP(C(2,1)*X(4,I)+C(2,2)*X(5,I)+C(2,3)*X(6,I)+C(2,4)*ALX04)
     :*C(2,4)*ALX04_9
      Y02_16=DEXP(C(2,1)*X(4,I)+C(2,2)*X(5,I)+C(2,3)*X(6,I)+C(2,4)*ALX04
     :)*X(4,I)
      Y02_17=DEXP(C(2,1)*X(4,I)+C(2,2)*X(5,I)+C(2,3)*X(6,I)+C(2,4)*ALX04
     :)*X(5,I)
      Y02_18=DEXP(C(2,1)*X(4,I)+C(2,2)*X(5,I)+C(2,3)*X(6,I)+C(2,4)*ALX04
     :)*X(6,I)
      Y02_19=DEXP(C(2,1)*X(4,I)+C(2,2)*X(5,I)+C(2,3)*X(6,I)+C(2,4)*ALX04
     :)*C(2,4)*ALX04_19
      Y02=DEXP(C(2,1)*X(4,I)+C(2,2)*X(5,I)+C(2,3)*X(6,I)+C(2,4)*ALX04)
      EL1T_1=DEXP(X(7,I)*(-XL1))*X(7,I)*(-XL1_1)
      EL1T_2=DEXP(X(7,I)*(-XL1))*X(7,I)*(-XL1_2)
      EL1T_5=DEXP(X(7,I)*(-XL1))*X(7,I)*(-XL1_5)
      EL1T_6=DEXP(X(7,I)*(-XL1))*X(7,I)*(-XL1_6)
      EL1T=DEXP(X(7,I)*(-XL1))
      EL2T_1=DEXP(X(7,I)*(-XL2))*X(7,I)*(-XL2_1)
      EL2T_2=DEXP(X(7,I)*(-XL2))*X(7,I)*(-XL2_2)
      EL2T_5=DEXP(X(7,I)*(-XL2))*X(7,I)*(-XL2_5)
      EL2T_6=DEXP(X(7,I)*(-XL2))*X(7,I)*(-XL2_6)
      EL2T=DEXP(X(7,I)*(-XL2))
      E1_1=P11_1*Y1+P13_1*X(8,I)+P14_1*Y4-EL1T_1*(P11*Y01+P12*Y02+P13*X(
     :9,I)+P14*Y04)-EL1T*(P11_1*Y01+P13_1*X(9,I)+P14_1*Y04)
      E1_2=P11_2*Y1+P12_2*Y2+P13_2*X(8,I)+P14_2*Y4-EL1T_2*(P11*Y01+P12*Y
     :02+P13*X(9,I)+P14*Y04)-EL1T*(P11_2*Y01+P12_2*Y02+P13_2*X(9,I)+P14_
     :2*Y04)
      E1_3=P13_3*X(8,I)-EL1T*P13_3*X(9,I)
      E1_4=P14_4*Y4-EL1T*P14_4*Y04
      E1_5=P11_5*Y1+P13_5*X(8,I)+P14_5*Y4-EL1T_5*(P11*Y01+P12*Y02+P13*X(
     :9,I)+P14*Y04)-EL1T*(P11_5*Y01+P13_5*X(9,I)+P14_5*Y04)
      E1_6=P11_6*Y1+P13_6*X(8,I)+P14_6*Y4-EL1T_6*(P11*Y01+P12*Y02+P13*X(
     :9,I)+P14*Y04)-EL1T*(P11_6*Y01+P13_6*X(9,I)+P14_6*Y04)
      E1_7=P13_7*X(8,I)-EL1T*P13_7*X(9,I)
      E1_8=P14_8*Y4-EL1T*P14_8*Y04
      E1_9=P11*Y1_9+P12*Y2_9+P14_9*Y4+P14*Y4_9-EL1T*(P11*Y01_9+P12*Y02_9
     :+P14_9*Y04+P14*Y04_9)
      E1_10=0.
      E1_11=0.
      E1_12=P11*Y1_12-EL1T*P11*Y01_12
      E1_13=P11*Y1_13-EL1T*P11*Y01_13
      E1_14=P11*Y1_14-EL1T*P11*Y01_14
      E1_15=P11*Y1_15-EL1T*P11*Y01_15
      E1_16=P12*Y2_16-EL1T*P12*Y02_16
      E1_17=P12*Y2_17-EL1T*P12*Y02_17
      E1_18=P12*Y2_18-EL1T*P12*Y02_18
      E1_19=P11*Y1_19+P12*Y2_19+P14*Y4_19-EL1T*(P11*Y01_19+P12*Y02_19+P1
     :4*Y04_19)
      E1=P11*Y1+P12*Y2+P13*X(8,I)+P14*Y4
     1     -EL1T*(P11*Y01+P12*Y02+P13*X(9,I)+P14*Y04)
      E2_1=P22_1*Y2+P23_1*X(8,I)+P24_1*Y4-EL2T_1*(P21*Y01+P22*Y02+P23*X(
     :9,I)+P24*Y04)-EL2T*(P22_1*Y02+P23_1*X(9,I)+P24_1*Y04)
      E2_2=P22_2*Y2+P23_2*X(8,I)+P24_2*Y4-EL2T_2*(P21*Y01+P22*Y02+P23*X(
     :9,I)+P24*Y04)-EL2T*(P22_2*Y02+P23_2*X(9,I)+P24_2*Y04)
      E2_3=P23_3*X(8,I)-EL2T*P23_3*X(9,I)
      E2_4=P24_4*Y4-EL2T*P24_4*Y04
      E2_5=P21_5*Y1+P22_5*Y2+P23_5*X(8,I)+P24_5*Y4-EL2T_5*(P21*Y01+P22*Y
     :02+P23*X(9,I)+P24*Y04)-EL2T*(P21_5*Y01+P22_5*Y02+P23_5*X(9,I)+P24_
     :5*Y04)
      E2_6=P22_6*Y2+P23_6*X(8,I)+P24_6*Y4-EL2T_6*(P21*Y01+P22*Y02+P23*X(
     :9,I)+P24*Y04)-EL2T*(P22_6*Y02+P23_6*X(9,I)+P24_6*Y04)
      E2_7=P23_7*X(8,I)-EL2T*P23_7*X(9,I)
      E2_8=P24_8*Y4-EL2T*P24_8*Y04
      E2_9=P21*Y1_9+P22*Y2_9+P24_9*Y4+P24*Y4_9-EL2T*(P21*Y01_9+P22*Y02_9
     :+P24_9*Y04+P24*Y04_9)
      E2_10=0.
      E2_11=0.
      E2_12=P21*Y1_12-EL2T*P21*Y01_12
      E2_13=P21*Y1_13-EL2T*P21*Y01_13
      E2_14=P21*Y1_14-EL2T*P21*Y01_14
      E2_15=P21*Y1_15-EL2T*P21*Y01_15
      E2_16=P22*Y2_16-EL2T*P22*Y02_16
      E2_17=P22*Y2_17-EL2T*P22*Y02_17
      E2_18=P22*Y2_18-EL2T*P22*Y02_18
      E2_19=P21*Y1_19+P22*Y2_19+P24*Y4_19-EL2T*(P21*Y01_19+P22*Y02_19+P2
     :4*Y04_19)
      E2=P21*Y1+P22*Y2+P23*X(8,I)+P24*Y4
     1     -EL2T*(P21*Y01+P22*Y02+P23*X(9,I)+P24*Y04)
      IF(ABS(XL1).GT.1.D-22) GO TO 222
      R1_1=0.
      R1_2=0.
      R1_5=0.
      R1_6=0.
         R1=-X(7,I)
      E1_1=E1_1-R1_1*PB1-R1*PB1_1
      E1_2=E1_2-R1_2*PB1-R1*PB1_2
      E1_3=E1_3-R1*PB1_3
      E1_4=E1_4-R1*PB1_4
      E1_5=E1_5-R1_5*PB1-R1*PB1_5
      E1_6=E1_6-R1_6*PB1-R1*PB1_6
      E1_7=E1_7-R1*PB1_7
      E1_8=E1_8-R1*PB1_8
      E1_9=E1_9-R1*PB1_9
      E1_10=E1_10-R1*PB1_10
      E1_11=E1_11-R1*PB1_11
         E1=E1-R1*PB1
         GO TO 333
 *** Use CONTINUE for label ***
      R1_1=(EL1T_1*EL1T+EL1T*EL1T_1-(EL1T*EL1T-1.)/(XL1+XL1)*(XL1_1+XL1_
     :1))/(XL1+XL1)
      R1_2=(EL1T_2*EL1T+EL1T*EL1T_2-(EL1T*EL1T-1.)/(XL1+XL1)*(XL1_2+XL1_
     :2))/(XL1+XL1)
      R1_5=(EL1T_5*EL1T+EL1T*EL1T_5-(EL1T*EL1T-1.)/(XL1+XL1)*(XL1_5+XL1_
     :5))/(XL1+XL1)
      R1_6=(EL1T_6*EL1T+EL1T*EL1T_6-(EL1T*EL1T-1.)/(XL1+XL1)*(XL1_6+XL1_
     :6))/(XL1+XL1)
 222  R1=(EL1T*EL1T-1.)/(XL1+XL1)
      E1_1=E1_1+((-EL1T_1)-(1.-EL1T)/XL1*XL1_1)/XL1*PB1+(1.-EL1T)/XL1*PB
     :1_1
      E1_2=E1_2+((-EL1T_2)-(1.-EL1T)/XL1*XL1_2)/XL1*PB1+(1.-EL1T)/XL1*PB
     :1_2
      E1_3=E1_3+(1.-EL1T)/XL1*PB1_3
      E1_4=E1_4+(1.-EL1T)/XL1*PB1_4
      E1_5=E1_5+((-EL1T_5)-(1.-EL1T)/XL1*XL1_5)/XL1*PB1+(1.-EL1T)/XL1*PB
     :1_5
      E1_6=E1_6+((-EL1T_6)-(1.-EL1T)/XL1*XL1_6)/XL1*PB1+(1.-EL1T)/XL1*PB
     :1_6
      E1_7=E1_7+(1.-EL1T)/XL1*PB1_7
      E1_8=E1_8+(1.-EL1T)/XL1*PB1_8
      E1_9=E1_9+(1.-EL1T)/XL1*PB1_9
      E1_10=E1_10+(1.-EL1T)/XL1*PB1_10
      E1_11=E1_11+(1.-EL1T)/XL1*PB1_11
      E1=E1+(1.-EL1T)/XL1*PB1
 333  IF(ABS(XL2).GT.1.D-22) GO TO 444
      R2_1=0.
      R2_2=0.
      R2_5=0.
      R2_6=0.
         R2=-X(7,I)
      E2_1=E2_1-R2_1*PB2-R2*PB2_1
      E2_2=E2_2-R2_2*PB2-R2*PB2_2
      E2_3=E2_3-R2*PB2_3
      E2_4=E2_4-R2*PB2_4
      E2_5=E2_5-R2_5*PB2-R2*PB2_5
      E2_6=E2_6-R2_6*PB2-R2*PB2_6
      E2_7=E2_7-R2*PB2_7
      E2_8=E2_8-R2*PB2_8
      E2_9=E2_9-R2*PB2_9
      E2_10=E2_10-R2*PB2_10
      E2_11=E2_11-R2*PB2_11
         E2=E2-R2*PB2
         GO TO 555
 *** Use CONTINUE for label ***
      R2_1=(EL2T_1*EL2T+EL2T*EL2T_1-(EL2T*EL2T-1.)/(XL2+XL2)*(XL2_1+XL2_
     :1))/(XL2+XL2)
      R2_2=(EL2T_2*EL2T+EL2T*EL2T_2-(EL2T*EL2T-1.)/(XL2+XL2)*(XL2_2+XL2_
     :2))/(XL2+XL2)
      R2_5=(EL2T_5*EL2T+EL2T*EL2T_5-(EL2T*EL2T-1.)/(XL2+XL2)*(XL2_5+XL2_
     :5))/(XL2+XL2)
      R2_6=(EL2T_6*EL2T+EL2T*EL2T_6-(EL2T*EL2T-1.)/(XL2+XL2)*(XL2_6+XL2_
     :6))/(XL2+XL2)
 444  R2=(EL2T*EL2T-1.)/(XL2+XL2)
      E2_1=E2_1+((-EL2T_1)-(1.-EL2T)/XL2*XL2_1)/XL2*PB2+(1.-EL2T)/XL2*PB
     :2_1
      E2_2=E2_2+((-EL2T_2)-(1.-EL2T)/XL2*XL2_2)/XL2*PB2+(1.-EL2T)/XL2*PB
     :2_2
      E2_3=E2_3+(1.-EL2T)/XL2*PB2_3
      E2_4=E2_4+(1.-EL2T)/XL2*PB2_4
      E2_5=E2_5+((-EL2T_5)-(1.-EL2T)/XL2*XL2_5)/XL2*PB2+(1.-EL2T)/XL2*PB
     :2_5
      E2_6=E2_6+((-EL2T_6)-(1.-EL2T)/XL2*XL2_6)/XL2*PB2+(1.-EL2T)/XL2*PB
     :2_6
      E2_7=E2_7+(1.-EL2T)/XL2*PB2_7
      E2_8=E2_8+(1.-EL2T)/XL2*PB2_8
      E2_9=E2_9+(1.-EL2T)/XL2*PB2_9
      E2_10=E2_10+(1.-EL2T)/XL2*PB2_10
      E2_11=E2_11+(1.-EL2T)/XL2*PB2_11
      E2=E2+(1.-EL2T)/XL2*PB2
 *** Use CONTINUE for label ***
 555  R3=(1.-DEXP(2.D0*X(7,I)))*0.5
      W1_1=W1_1+(E1_1*E1+E1*E1_1-E1*E1/R1*R1_1)/R1
      W1_2=W1_2+(E1_2*E1+E1*E1_2-E1*E1/R1*R1_2)/R1
      W1_3=W1_3+(E1_3*E1+E1*E1_3)/R1
      W1_4=W1_4+(E1_4*E1+E1*E1_4)/R1
      W1_5=W1_5+(E1_5*E1+E1*E1_5-E1*E1/R1*R1_5)/R1
      W1_6=W1_6+(E1_6*E1+E1*E1_6-E1*E1/R1*R1_6)/R1
      W1_7=W1_7+(E1_7*E1+E1*E1_7)/R1
      W1_8=W1_8+(E1_8*E1+E1*E1_8)/R1
      W1_9=W1_9+(E1_9*E1+E1*E1_9)/R1
      W1_10=W1_10+(E1_10*E1+E1*E1_10)/R1
      W1_11=W1_11+(E1_11*E1+E1*E1_11)/R1
      W1_12=W1_12+(E1_12*E1+E1*E1_12)/R1
      W1_13=W1_13+(E1_13*E1+E1*E1_13)/R1
      W1_14=W1_14+(E1_14*E1+E1*E1_14)/R1
      W1_15=W1_15+(E1_15*E1+E1*E1_15)/R1
      W1_16=W1_16+(E1_16*E1+E1*E1_16)/R1
      W1_17=W1_17+(E1_17*E1+E1*E1_17)/R1
      W1_18=W1_18+(E1_18*E1+E1*E1_18)/R1
      W1_19=W1_19+(E1_19*E1+E1*E1_19)/R1
      W1=W1+E1*E1/R1
      W2_1=W2_1+(E2_1*E2+E2*E2_1-E2*E2/R2*R2_1)/R2
      W2_2=W2_2+(E2_2*E2+E2*E2_2-E2*E2/R2*R2_2)/R2
      W2_3=W2_3+(E2_3*E2+E2*E2_3)/R2
      W2_4=W2_4+(E2_4*E2+E2*E2_4)/R2
      W2_5=W2_5+(E2_5*E2+E2*E2_5-E2*E2/R2*R2_5)/R2
      W2_6=W2_6+(E2_6*E2+E2*E2_6-E2*E2/R2*R2_6)/R2
      W2_7=W2_7+(E2_7*E2+E2*E2_7)/R2
      W2_8=W2_8+(E2_8*E2+E2*E2_8)/R2
      W2_9=W2_9+(E2_9*E2+E2*E2_9)/R2
      W2_10=W2_10+(E2_10*E2+E2*E2_10)/R2
      W2_11=W2_11+(E2_11*E2+E2*E2_11)/R2
      W2_12=W2_12+(E2_12*E2+E2*E2_12)/R2
      W2_13=W2_13+(E2_13*E2+E2*E2_13)/R2
      W2_14=W2_14+(E2_14*E2+E2*E2_14)/R2
      W2_15=W2_15+(E2_15*E2+E2*E2_15)/R2
      W2_16=W2_16+(E2_16*E2+E2*E2_16)/R2
      W2_17=W2_17+(E2_17*E2+E2*E2_17)/R2
      W2_18=W2_18+(E2_18*E2+E2*E2_18)/R2
      W2_19=W2_19+(E2_19*E2+E2*E2_19)/R2
      W2=W2+E2*E2/R2
      W3=W3+X(10,I)*X(10,I)/R3
      FN_1=FN_1+0.5*(R1_1*R2+R1*R2_1)*R3/R1/R2/R3/NOBS
      FN_2=FN_2+0.5*(R1_2*R2+R1*R2_2)*R3/R1/R2/R3/NOBS
      FN_5=FN_5+0.5*(R1_5*R2+R1*R2_5)*R3/R1/R2/R3/NOBS
      FN_6=FN_6+0.5*(R1_6*R2+R1*R2_6)*R3/R1/R2/R3/NOBS
      FN_9=FN_9+((-ALXC1_9)-ALXC2_9)/NOBS
      FN_12=FN_12+(-ALXC1_12)/NOBS
      FN_13=FN_13+(-ALXC1_13)/NOBS
      FN_14=FN_14+(-ALXC1_14)/NOBS
      FN_15=FN_15+(-ALXC1_15)/NOBS
      FN_16=FN_16+(-ALXC2_16)/NOBS
      FN_17=FN_17+(-ALXC2_17)/NOBS
      FN_18=FN_18+(-ALXC2_18)/NOBS
      FN_19=FN_19+((-ALXC1_19)-ALXC2_19)/NOBS
      FN=FN+(0.5*DLOG(R1*R2*R3)-ALXC1-ALXC2)/NOBS
   10 continue
C -- LOOP ENDS -
      FN_1=FN_1+0.5*(W1_1*W2+W1*W2_1)*W3/W1/W2/W3
      FN_2=FN_2+0.5*(W1_2*W2+W1*W2_2)*W3/W1/W2/W3
      FN_3=FN_3+0.5*(W1_3*W2+W1*W2_3)*W3/W1/W2/W3
      FN_4=FN_4+0.5*(W1_4*W2+W1*W2_4)*W3/W1/W2/W3
      FN_5=FN_5+0.5*(W1_5*W2+W1*W2_5)*W3/W1/W2/W3
      FN_6=FN_6+0.5*(W1_6*W2+W1*W2_6)*W3/W1/W2/W3
      FN_7=FN_7+0.5*(W1_7*W2+W1*W2_7)*W3/W1/W2/W3
      FN_8=FN_8+0.5*(W1_8*W2+W1*W2_8)*W3/W1/W2/W3
      FN_9=FN_9+0.5*(W1_9*W2+W1*W2_9)*W3/W1/W2/W3
      FN_10=FN_10+0.5*(W1_10*W2+W1*W2_10)*W3/W1/W2/W3
      FN_11=FN_11+0.5*(W1_11*W2+W1*W2_11)*W3/W1/W2/W3
      FN_12=FN_12+0.5*(W1_12*W2+W1*W2_12)*W3/W1/W2/W3
      FN_13=FN_13+0.5*(W1_13*W2+W1*W2_13)*W3/W1/W2/W3
      FN_14=FN_14+0.5*(W1_14*W2+W1*W2_14)*W3/W1/W2/W3
      FN_15=FN_15+0.5*(W1_15*W2+W1*W2_15)*W3/W1/W2/W3
      FN_16=FN_16+0.5*(W1_16*W2+W1*W2_16)*W3/W1/W2/W3
      FN_17=FN_17+0.5*(W1_17*W2+W1*W2_17)*W3/W1/W2/W3
      FN_18=FN_18+0.5*(W1_18*W2+W1*W2_18)*W3/W1/W2/W3
      FN_19=FN_19+0.5*(W1_19*W2+W1*W2_19)*W3/W1/W2/W3
C*** WARNING: Statement interpreted as
C***  FN=FN+0.5*DLOG(W1*W2*W3)
      FN=FN+0.5*(DLOG(W1*W2*W3))
    2 CONTINUE
      INF=ITR
      RETURN
      END
