boolean (@NotNull DfType other) { if (other == DfType.BOTTOM || other.equals(this)) return true; if (other instanceof DfFloatConstantType) { float val = ((DfFloatConstantType)other).getValue(); if (Float.isNaN(val)) return myNaN; int from = Float.compare(myFrom, val); int to = Float.compare(val, myTo); return (from <= 0 && to <= 0) != myInvert; } if (other instanceof DfFloatRangeType range) { if (range.myNaN && !myNaN) return false; if (!myInvert && myFrom == Float.NEGATIVE_INFINITY && myTo == Float.POSITIVE_INFINITY) return true; int from = Float.compare(myFrom, range.myFrom); int to = Float.compare(range.myTo, myTo); if (myInvert) { if (range.myInvert) { return from >= 0 && to >= 0; } else { return Float.compare(range.myTo, myFrom) < 0 || Float.compare(range.myFrom, myTo) > 0; } } else { return !range.myInvert && from <= 0 && to <= 0; } } return false; }