LongRangeSet (LongRangeSet divisor) { if (divisor.isEmpty() || divisor.equals(Point.ZERO)) return empty(); if (divisor instanceof Point && ((Point)divisor).myValue == Long.MIN_VALUE) { return this.contains(Long.MIN_VALUE) ? this.subtract(divisor).join(Point.ZERO) : this; } if (divisor.contains(Long.MIN_VALUE)) { return possibleMod(); } long min = divisor.min(); long max = divisor.max(); long maxDivisor = Math.max(Math.abs(min), Math.abs(max)); long minDivisor = min > 0 ? min : max < 0 ? Math.abs(max) : 0; if (!intersects(LongRangeSet.range(Long.MIN_VALUE, -minDivisor)) && !intersects(LongRangeSet.range(minDivisor, Long.MAX_VALUE))) { return this; } return possibleMod().meet(range(-maxDivisor + 1, maxDivisor - 1)); }