extra min and max checking
misc edits
faster isUpperTriangular using isRangeZero
faster isLowerTriangular using isRangeZero