anchor.diff:            IACT(K)=K
      40     VMULTC(K)=RESMAX-B(K)
         END IF
  -      if (resmax.le.-1d0) print*,STEP
         IF (RESMAX .EQ. 0.0d0) GOTO 480
         DO 50 I=1,N
      50 SDIRN(I)=0.0d0
  
positive.code:   500 RETURN
        END
  
  
negative.code: C     RESMAX to the corresponding maximum residual if stage one is being done.
  C     Because DXNEW will be changed during the calculation of some Lagrange
  C     multipliers, it will be restored to the following value later.
        call s360_380(DXNEW,DX,STEP,SDIRN,N,M,MCON,RESMAX,
       1 NACT,IACT,B,A,RESOLD)
  
  C
  C     Set VMULTD to the VMULTC vector that would occur if DX became DXNEW. A
  C     device is included to force VMULTD(K)=0.0 if deviations from this value
  