DfType (@NotNull RelationType relationType, float min, float max) { assert !Float.isNaN(min); assert !Float.isNaN(max); return switch (relationType) { case LE -> create(Float.NEGATIVE_INFINITY, max == 0.0f ? 0.0f : max, false, true); case LT -> max == Float.NEGATIVE_INFINITY ? DfTypes.FLOAT_NAN : create(Float.NEGATIVE_INFINITY, Math.nextDown(max), false, true); case GE -> create(min == 0.0f ? -0.0f : min, Float.POSITIVE_INFINITY, false, true); case GT -> min == Float.POSITIVE_INFINITY ? DfTypes.FLOAT_NAN : create(Math.nextUp(min), Float.POSITIVE_INFINITY, false, true); case EQ -> { if (min == 0.0f) min = -0.0f; if (max == 0.0f) max = 0.0f; yield create(min, max, false, true); } case NE -> { if (min == max) { if (min == 0.0f) { yield create(-0.0f, 0.0f, true, true); } yield create(min, min, true, true); } yield DfTypes.FLOAT; } default -> DfTypes.FLOAT; }; }