anchor.diff:    b%det(:,:,nmwen+1:) = 0_bit_kind
     b%val(:nmwen) = vals(:)
     b%val(nmwen+1:) = 0d0
  -  b%mini = dabs(b%val(b%N))
  +  b%mini = max(b%mini,dabs(b%val(b%N)))
     b%cur = nmwen
   end subroutine
   
  
positive.code:           else
              e_pert(k) = 0.5d0 * ( dsqrt(delta_E * delta_E + 4.d0 * i_H_psi_value(k) * i_H_psi_value(k)) - delta_E)
            endif
            if(dabs(e_pert(k)) > dabs(e_pertm)) e_pertm = e_pert(k)
            pt2(k) += e_pert(k)
          enddo
          if(dabs(e_pertm) > dabs(buf%mini)) then
  
negative.code:   do ispin1=1,2
    do ispin2=1,ispin1
      integer :: i_hole1, i_hole2, j_hole, k_hole
      do i1=N_holes(ispin1),1,-1   ! Generate low excitations first
      if(ispin1 == ispin2) then
        ib = i1+1
      else
        ib = 1
      endif
      do i2=N_holes(ispin2),ib,-1   ! Generate low excitations first
        ion_det(:,:) = psi_det_generators(:,:,i_generator)
  
        i_hole1 = hole_list(i1,ispin1)
  