If the range covers the boundary (Long.MAX - Long.MIN), this will fail.