Piecewise[{{val1, cond1}, {val2, cond2}, ...}] represents a piecewise function with values vali in the regions defined by the conditions condi. Piecewise[{{val1, cond1}, ...}, val] uses default value val if none of the condi apply. The default for val is 0.
piecewise
piecewise e_1 invisible comma 1 | e_1 invisible comma 2 e_2 invisible comma 1 | e_2 invisible comma 2 ... | | Piecewise[{{e_1 invisible comma 1, e_1 invisible comma 2}, {e_2 invisible comma 1, e_2 invisible comma 2}, ...}] expr::string | MessageName[expr, "string"] expr::string_1::string_2 | MessageName[expr, "string_1", "string_2"] # | Slot[1] ## | SlotSequence[1] #n | Slot[n] ##n | SlotSequence[n] ⋮ (grouped in order of decreasing precedence)
HoldAll | Protected | ReadProtected
PiecewiseExpand | $MaxPiecewiseCases | Boole | Max | Min | RealAbs | Abs | RealSign | Sign | Clip | Ramp | UnitStep | UnitBox | UnitTriangle | Floor | Ceiling | Round | IntegerPart | Mod | SquareWave | TriangleWave | BezierFunction | BSplineFunction | Which | If
239th most common (1 in 7140 symbols)
297th most common (1 in 7800 symbols)
387th most common (1 in 5730 symbols)
introduced in Version 5.1 (October 2004) last modified in Version 7 (November 2008)