anchor.diff:      integer, pointer :: all_hnfs(:,:,:), unq_hnfs(:,:,:), degeneracy_list(:)
       type(opList), pointer :: fixop(:)
       real(dp), pointer :: latts(:,:,:), d(:,:)
  -    real(dp) :: reduced_latt(3,3), norms(3)
  +    real(dp) :: reduced_latt(3,3), norms(3), inv_lat(3,3)
       integer :: temp_hnfs(3,3,100)
   
       LatDim = 3
       n_min = 2
       if (.not. present(n_)) then
  -       n_max = 100/size(basis,2)
  +       n_max = 100
       else
  -       n_max = n_/size(basis,2)
  +       n_max = n_
       end if
   
       if (.not. present(eps_)) then
  
positive.code:        eps = eps_
      end if
  
      allocate(d(size(basis,1),size(basis,2)))
      d = basis
      hnfs = 0
      n_hnfs = 0
      r_mins = 0
  
      call get_dvector_permutations(A,d,dRPList,LatDim,eps)
  
      do i=n_min,n_max
         call get_all_HNFs(i,all_hnfs)
  
negative.code:   !!<summary>Lists the HNFs for the given symmetry group.</summary>
    !!<parameter name="A" regular="true">The parent lattice for the
    !!system.</parameter>
    !!<parameter name="n_" regular="true">The determinant of the desired
    !!HNF.</parameter>
    !!<parameter name="eps_" regular="true">The floating point
  