anchor.diff:        SUBROUTINE TRSTLP (N,M,A,B,RHO,DX,IFULL,IACT,Z,ZDOTA,VMULTC,
        1  SDIRN,DXNEW,VMULTD,IPRINT)
         IMPLICIT DOUBLE PRECISION (A-H,O-Z)
  +      DOUBLE PRECISION TEMP
         DIMENSION A(N,*),B(*),DX(*),IACT(*),Z(N,*),ZDOTA(*),
        1  VMULTC(*),SDIRN(*),DXNEW(*),VMULTD(*)
   C
  
positive.code:           DO 80 I=1,N
     80     OPTNEW=OPTNEW-DX(I)*A(I,MCON)
        END IF
        IF (ICOUNT .EQ. 0 .OR. OPTNEW .LT. OPTOLD) THEN
            OPTOLD=OPTNEW
            NACTX=NACT
  
negative.code:       KK=IACT(ICON)
        DO 90 I=1,N
     90 DXNEW(I)=A(I,KK)
        TOT=0.0D0
        K=N
        print *, '   k, nact, dxnew =', k, nact, (dxnew(i),i=1,n)
    100 IF (K .GT. NACT) THEN
            SP=0.0d0
            SPABS=0.0d0
  