pure function sign_lt(ilutI, ilutJ) result(bLt)
! This is a comparison function between two bit strings of length
! 0:NIfTot, and will return true if absolute value of the sign of
! ilutI is less than ilutJ
integer(n_int), intent(in) :: iLutI(0:), iLutJ(0:)
logical :: bLt
real(dp) :: SignI(lenof_sign), SignJ(lenof_sign)
real(dp) :: WeightI, WeightJ
call extract_sign(ilutI, SignI)
call extract_sign(ilutJ, SignJ)
if (lenof_sign == 1) then
bLt = abs(SignI(1)) < abs(SignJ(1))
else
WeightI = sqrt(real(SignI(1), dp)**2 + &
real(SignI(lenof_sign), dp)**2)
WeightJ = sqrt(real(SignJ(1), dp)**2 + &
real(SignJ(lenof_sign), dp)**2)
bLt = WeightI < WeightJ
end if
end function sign_lt