anchor.diff:  
   contains
   
  -  ! TODO: add optional switch for left or right eigenvectors in deig() and zeig()
  +  ! TODO: add optional switch for left or right eigenvectors in deig() and zeig()?
     subroutine deig(A, lam, c)
       real(dp), intent(in) :: A(:, :)  ! matrix for eigenvalue compuation
       complex(dp), intent(out) :: lam(:)  ! eigenvalues: A c = lam c
  
positive.code:     integer :: info, lda, liwork, lrwork, lwork, n
      integer, allocatable :: iwork(:)
      real(dp), allocatable :: rwork(:)
      complex(dp), allocatable :: Amt(:, :), work(:)
  
      ! use LAPACK's ZHEEVD routine
      n = size(Am, 1)
      lda = max(1, n)
      lwork = 2*n + n**2
      lrwork = 1 + 5*n + 2*n**2
      liwork = 3 + 5*n
      allocate(Amt(lda,n), work(lwork), rwork(lrwork), &
           iwork(liwork))
      Amt = Am
      call ZHEEVD("V", "L", n, Amt, lda, lam, work, lwork, rwork, lrwork, &
           iwork, liwork, info)
      if (info /= 0) then
         print *, "zheevd returned info =", info
  
negative.code:     ! LAPACK variables:
      integer :: info, lda, ldvl, ldvr, lwork, n, lrwork
      real(dp), allocatable :: rwork(:)
      complex(dp), allocatable :: vl(:,:), vr(:,:), work(:)
  
      lda = size(A(:,1))
      n = size(A(1,:))
  