rem returns the remainder left by dividing two numbers. Both arguments must be numbers; a zero divisor raises ArithmeticException, and double inputs produce a double result. section 5.7
Use these results to distinguish rem from related numeric operations:
- Use quot for the whole-number division result and rem for the leftover amount. section 5.7
Sizing containers
Combine quot and rem to calculate a container size: (optimal-size 900 22) returns 41, then partition-all groups the items into containers of that size.
