I've written an equation in a programming language which I need to express using maths:
slots = (elements_count - (elements_count % slot_size) + slot_size) / slot_size
In Excel, you can also write (replaced cell names):
=(FLOOR.PRECISE(elements_count;slot_size)+slot_size)/slot_size
I've changed the story and variable names for the purpose of this question, but let's say the equation is used to figure out how many slots of size slot_size we need to fit elements_count elements.
The modulus is used to round up to the nearest whole number divisible with slot_size. The division then converts this to number of slots. It is correct that the result is 1 when there are zero elements.
How can I express this in mathematical notation? Is there a syntax to round up or down to the nearest number divisible with another number?