anchor.diff:  !
   !------------------------------------------------------------------------------+
   !    M : Matrix
  -! ROWS : Matrix rows
  -! COLS : Matrix columns
   !  COL : Associated column to be zeroed for elimination.
   !------------------------------------------------------------------------------+
  -      SUBROUTINE MGECOL(M,ROWS,COLS,COL)
  -      IMPLICIT NONE
  -      DOUBLE PRECISION M(ROWS,COLS)
  -      INTEGER ROWS,COLS,COL
  -      INTEGER J
  -!
  -      DO 110 J = COL+1, ROWS
  -  110 CALL MGEROW(M,ROWS,COLS,J,COL,COL+1)
  +  SUBROUTINE MGECOL(M,COL)
  +    IMPLICIT NONE
  +    REAL(KIND=8),INTENT(INOUT) :: M(:,:)
  +    INTEGER(KIND=4),INTENT(IN) :: COL
  +    INTEGER(KIND=4)            :: SH(2),J
  +!
  +      SH = SHAPE(M)
  +      DO 110 J = COL+1, SH(1)
  +  110 CALL MGEROW(M,J,COL,COL+1)
     999 RETURN
  -      END SUBROUTINE MGECOL
  +  END SUBROUTINE MGECOL
   !------------------------------------------------------------------------------+
   ! MGJEROW: Matrix Gauss-Jordan Eliminate ROW
   !------------------------------------------------------------------------------+
  
positive.code: !
  !------------------------------------------------------------------------------+
  !    M : Matrix
  ! ROWS : Matrix rows
  ! COLS : Matrix columns
  !------------------------------------------------------------------------------+
        SUBROUTINE MBSUB(M,ROWS,COLS)
        IMPLICIT NONE
        DOUBLE PRECISION M(ROWS,COLS)
        INTEGER ROWS,COLS
        INTEGER I,J,K
        DOUBLE PRECISION SUM
  !
        DO 110 I = ROWS+1, COLS
        DO 110 J = ROWS, 1, -1
        SUM = 0D0
        DO 120 K = ROWS, J+1, -1
    120 SUM = SUM + M(J,K) * M(K,I)
    110 M(J,I) = (M(J,I) - SUM) / M(J,J)
    999 RETURN
        END SUBROUTINE MBSUB
  !------------------------------------------------------------------------------+
  ! MMUL:  Matrix Multipliction
  !------------------------------------------------------------------------------+
  ! Product of [A]*[B] is placed in P.
  !------------------------------------------------------------------------------+
  ! A     : Matrix A
  ! AROWS : Rows of A
  ! ACOLS : Cols of A (Must match BROWS)
  ! B     : Matrix B
  ! BROWS : Rows of B (Must match ACOLS)
  ! BCOLS : Cols of B
  ! P     : Matrix P (product: [P] = [A] * [B])
  ! PROWS : Rows of P (Must be .GE. AROWS)
  ! PCOLS : Cols of P (Must be .GE. BCOLS)
  !------------------------------------------------------------------------------+
  !
  !          [A]     *         [B]         =         [P]
  !
  !      | A11 A12 |   | B11 B12 B13 B14 |   | P11 P12 P13 P14 |
  !      | A21 A22 | * | B21 B22 B23 B12 | = | P21 P22 P23 P24 |
  !      | A31 A32 |                         | P31 P32 P33 P34 |
  !
  !
  !                      <-------- K -------->
  !
  !                P11 = A11 * B11 + A12 * B21   ^   ^
  !                P21 = A21 * B11 + A22 * B21   I   |
  !                P31 = A31 * B11 + A32 * B21   v   |
  !                                                  |
  !                P12 = A11 * B12 + A12 * B22   ^   |
  !                P22 = A21 * B12 + A22 * B22   I   |
  !                P32 = A31 * B12 + A32 * B22   v    
  !                                                  J
  !                P13 = A11 * B13 + A12 * B23   ^    
  !                P23 = A21 * B13 + A22 * B23   I   |
  !                P33 = A31 * B13 + A32 * B23   v   |
  !                                                  |
  !                P14 = A11 * B14 + A12 * B24   ^   |
  !                P24 = A21 * B14 + A22 * B24   I   |
  !                P34 = A31 * B14 + A32 * B24   v   v
  !
  !------------------------------------------------------------------------------+
        SUBROUTINE MMUL(A,AROWS,ACOLS,B,BROWS,BCOLS,P,PROWS,PCOLS)
        IMPLICIT NONE
        DOUBLE PRECISION A(AROWS,ACOLS), B(BROWS,BCOLS), P(PROWS,PCOLS)
        INTEGER AROWS, ACOLS, BROWS, BCOLS, PSIZE, PROWS, PCOLS
        INTEGER I, J, K
        DOUBLE PRECISION SUM
  !
        IF (ACOLS.NE.BROWS) THEN
        WRITE(0,910) ACOLS, BROWS
        STOP
        END IF
        IF (PROWS.LT.AROWS) THEN
        WRITE(0,920) PROWS, AROWS
        STOP
        END IF
        IF (PCOLS.LT.BCOLS) THEN
        WRITE(0,930) PCOLS, BCOLS
        STOP
        END IF
  !
        DO 10 I = 1, PROWS
        DO 10 J = 1, PCOLS
        SUM = 0D0
        DO 20 K = 1, ACOLS
     20 SUM = SUM + A(I,K) * B(K,J)
     10 P(I,J) = SUM
  !
    910 FORMAT('*** FATAL ERRROR: MMUL: MATRIX A COLUMNS MUST MATCH' &
               ' MATRIX B ROWS:',/,18X,I8, '   .NE.   ', I8)
    920 FORMAT('*** FATAL ERRROR: MMUL: MATRIX P ROWS MUST AT LEAST' &
               ' EQUAL MATRIX A ROWS:',/,18X,I8, '   .LT.   ', I8)
    930 FORMAT('*** FATAL ERRROR: MMUL: MATRIX P COLUMNS MUST AT LEAST' &
               ' EQUAL MATRIX B COLUMNS:',/,18X,I8, '   .LT.   ', I8)
    999 RETURN
        END SUBROUTINE MMUL
  !------------------------------------------------------------------------------+
  ! MIPADD: Matrix In-Place ADDition
  !------------------------------------------------------------------------------+
        SUBROUTINE MIPADD(A,AROWS,ACOLS,B,BROWS,BCOLS)
        IMPLICIT NONE
        DOUBLE PRECISION A(AROWS,ACOLS),B(BROWS,BCOLS)
        INTEGER AROWS,ACOLS,BROWS,BCOLS
        INTEGER I,J
  !
        DO 110 I = 1, MIN(AROWS,BROWS)
        DO 110 J = 1, MIN(ACOLS,BCOLS)
    110 A(I,J) = A(I,J) + B(I,J)
    999 RETURN
        END SUBROUTINE MIPADD
  !------------------------------------------------------------------------------+
  ! MIPSUB: Matrix In-Place SUBtraction
  !------------------------------------------------------------------------------+
        SUBROUTINE MIPSUB(A,AROWS,ACOLS,B,BROWS,BCOLS)
        IMPLICIT NONE
        DOUBLE PRECISION A(AROWS,ACOLS),B(BROWS,BCOLS)
        INTEGER AROWS,ACOLS,BROWS,BCOLS
        INTEGER I,J
  !
        DO 110 I = 1, MIN(AROWS,BROWS)
        DO 110 J = 1, MIN(ACOLS,BCOLS)
    110 A(I,J) = A(I,J) + B(I,J)
    999 RETURN
        END SUBROUTINE MIPSUB
  !------------------------------------------------------------------------------+
  ! MPRT: Matrix PRinT
  !------------------------------------------------------------------------------+
        SUBROUTINE MPRT(M,ROWS,COLS)
        IMPLICIT NONE
        DOUBLE PRECISION M(ROWS,COLS)
        INTEGER ROWS, COLS
        INTEGER I, J
        CHARACTER F*9
  !
        WRITE(F,'(A1I2A6)') '(', COLS, 'F10.4)'
        DO 10 I = 1, ROWS
     10 WRITE(6,F) (M(I,J), J=1, COLS)
    999 RETURN
        END SUBROUTINE MPRT
  !------------------------------------------------------------------------------+
  
negative.code: !                | A41 A42 A43 A44 A45 B46 B47 |
  !                | A51 A52 A53 A54 A55 B56 B57 |
  !
  ! This procedure performs Gauss elimination with repeated calls
  ! to MGECOL leave an upper triangle matrix.  Junk values are left in
  ! place below the diagonal to save operations.  This results in the
  ! following:
  !
  !                | A11 A12 A13 A14 A15 B16 B17 |
  !                | JNK A22 A23 A24 A25 B26 B27 |
  !                | JNK JNK A33 A34 A35 B36 B37 |
  !                | JNK JNK JNK A44 A45 B46 B47 |
  !                | JNK JNK JNK JNK A55 B56 B57 |
  !
  ! The final step is to perform back substitution callin MBSUB resulting
  ! in the following:
  !
  !                | A11 A12 A13 A14 A15 X16 X17 |
  !                | JNK A22 A23 A24 A25 X26 X27 |
  !                | JNK JNK A33 A34 A35 X36 X37 |
  !                | JNK JNK JNK A44 A45 X46 X47 |
  !                | JNK JNK JNK JNK A55 X56 X57 |
  !
  ! X values are where the solution matrix is stored.
  !
  !------------------------------------------------------------------------------+
    SUBROUTINE MGAUSB(M)
      IMPLICIT NONE
      REAL(KIND=8),INTENT(INOUT) :: M(:,:)
      INTEGER(KIND=4)            :: SH(2)
      INTEGER I
  !
      SH = SHAPE(M)
      IF (SH(1).GT.SH(2)) THEN
        WRITE(0,910), SH(1), SH(2)
        STOP
      END IF
  !
      CALL MGAUS(M)
      CALL MBSUB(M)
  !
    910 FORMAT('*** FATAL ERRROR: MGAUSB: MATRIX ROWS LARGER THAN'   &
               ' COLUMNS',/,18X,I8, '   .GT.   ',I8)
    999 RETURN
    END SUBROUTINE
  !------------------------------------------------------------------------------+
  ! MGAUS: Matrix GAUSs elimination
  !------------------------------------------------------------------------------+
  !    M : Matrix
  ! ROWS : Number of rows
  