pure function sign_gt(ilutI, ilutJ) result(bGt)
! This is a comparison function between two bit strings of length
! 0:NIfTot, and will return true if the abs sign of ilutI is greater
! than ilutJ
integer(n_int), intent(in) :: iLutI(0:), iLutJ(0:)
logical :: bGt
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
bGt = 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)
bGt = WeightI > WeightJ
end if
end function sign_gt