$MaxPiecewiseCases
gives the maximum number of cases to allow in explicit Piecewise objects generated by expanding any single piecewise function.
Details

- The default value of $MaxPiecewiseCases is 100.
- $MaxPiecewiseCases is used not only in PiecewiseExpand, but also such functions as Integrate, Reduce, and FunctionExpand.
Examples
Basic Examples (1)Summary of the most common use cases
Floor is not converted to Piecewise because the number of piecewise cases exceeds 100:

https://wolfram.com/xid/0cf48cpy4g8lghe-gbpvsw


This increases the limit on the number of cases to 200:

https://wolfram.com/xid/0cf48cpy4g8lghe-eua2xd
Now PiecewiseExpand converts Floor to Piecewise:

https://wolfram.com/xid/0cf48cpy4g8lghe-213jt

This reverts $MaxPiecewiseCases to the default setting:

https://wolfram.com/xid/0cf48cpy4g8lghe-kappsz
Wolfram Research (2004), $MaxPiecewiseCases, Wolfram Language function, https://reference.wolfram.com/language/ref/$MaxPiecewiseCases.html.
Text
Wolfram Research (2004), $MaxPiecewiseCases, Wolfram Language function, https://reference.wolfram.com/language/ref/$MaxPiecewiseCases.html.
Wolfram Research (2004), $MaxPiecewiseCases, Wolfram Language function, https://reference.wolfram.com/language/ref/$MaxPiecewiseCases.html.
CMS
Wolfram Language. 2004. "$MaxPiecewiseCases." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/$MaxPiecewiseCases.html.
Wolfram Language. 2004. "$MaxPiecewiseCases." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/$MaxPiecewiseCases.html.
APA
Wolfram Language. (2004). $MaxPiecewiseCases. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/$MaxPiecewiseCases.html
Wolfram Language. (2004). $MaxPiecewiseCases. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/$MaxPiecewiseCases.html
BibTeX
@misc{reference.wolfram_2025_$maxpiecewisecases, author="Wolfram Research", title="{$MaxPiecewiseCases}", year="2004", howpublished="\url{https://reference.wolfram.com/language/ref/$MaxPiecewiseCases.html}", note=[Accessed: 04-April-2025
]}
BibLaTeX
@online{reference.wolfram_2025_$maxpiecewisecases, organization={Wolfram Research}, title={$MaxPiecewiseCases}, year={2004}, url={https://reference.wolfram.com/language/ref/$MaxPiecewiseCases.html}, note=[Accessed: 04-April-2025
]}