Implemented lengthGT4 with infinity support.