implements tenCmp properly
replaces of tenIsEq with new tensor cmp.