Domain of advanced piecewise functions