compareTo method not robust for large values