anchor.diff:  
     end subroutine uevaljac
   
  +  !----------------------------------------------------------!
  +  ! SUBROUTINE LEVALC                                        !
  +  !                                                          !
  +  ! This subroutine evaluates the linearized constraints of  !
  +  ! the optimality subproblem.                               !
  +  !                                                          !
  +  !----------------------------------------------------------!
  +
  +  subroutine levalc(n,x,ind,c,flag)
  +
  +    ! SCALAR ARGUMENTS
  +    integer :: flag,ind,n
  +    real(8) :: c
  +    
  +    ! ARRAY ARGUMENTS
  +    real(8) :: x(n)
  +    
  +    intent(in ) :: ind,n,x
  +    intent(out) :: c,flag
  +    
  +    ! LOCAL SCALARS
  +    integer :: end,i,start
  +
  +    start = linpos(ind)
  +    end   = linpos(ind + 1) - 1
  +
  +    c = linrhs(ind)
  +
  +    do i = start,end
  +       c = c + linval(i) * x(linvar(i))
  +    end do
  +
  +    flag = 0
  +    
  +  end subroutine levalc
  +  
  +  !----------------------------------------------------------!
  +  ! SUBROUTINE LEVALJAC                                      !
  +  !                                                          !
  +  ! This subroutine evaluates the gradients of the           !
  +  ! linearized constraints of the optimality subproblem.     !
  +  !----------------------------------------------------------!
  +  
  +  subroutine levaljac(n,x,ind,jcvar,jcval,jcnnz,flag)
  +
  +    ! SCALAR ARGUMENTS
  +    integer :: flag,ind,jcnnz,n
  +    
  +    ! ARRAY ARGUMENTS
  +    integer :: jcvar(n)
  +    real(8) :: jcval(n),x(n)
  +
  +    intent(in ) :: ind,n,x
  +    intent(out) :: flag,jcnnz,jcval,jcvar
  +
  +    ! LOCAL SCALARS
  +    integer :: end,i,start
  +
  +    start = linpos(ind)
  +    end   = linpos(ind + 1) - 1
  +
  +    jcnnz = end - start + 1
  +
  +    jcvar(1:jcnnz) = linvar(start:end)
  +    jcval(1:jcnnz) = linval(start:end)
  +
  +    flag = 0
  +
  +  end subroutine levaljac
   
   end module dfoirfilter
  
positive.code:   ! Maximum number of iterations
    integer, parameter :: MAXITER = 2
  
    ! SCALARS
    integer :: ncev,nfev,njev
  
  
negative.code:     external :: evalf_,evalc_,evaljac_
  
      ! LOCAL ARRAYS
      real(8) :: ffilter(MAXITER),hfilter(MAXITER),rl(n),ru(n),y(n),z(n),zd(n)
  
      ! LOCAL SCALARS
      integer :: i,j,k,iter,jcnnz,m,nf
      real(8) :: c,cfeas,dnorm,fx,fxnew,fz,hxnorm,hznorm,hzdnorm,nzdnorm
  
      iter = 1
  
  