How do we deal with units when using the modulo operation? I'm wondering how I should deal with units when I do a modulo operation. What is considered legal and what is not.
When I have two numbers that have units such as 13cm and 3cm, I can multiply them:
$$13cm \times 3cm = 39cm^2 $$
Similarly, I can do divisions:
$${39cm^2 \over 3cm} = 13cm$$
Now, I'm wondering what can I do with modulo. It seems to me that only distance less numbers can be used on the right side of the operation and the result keeps the same unit as the left side.
$$39cm \bmod 5 = 4cm$$
Is that correct? Where could I find information about dealing with units and all operators (relations, additions, multiplication, divisions, modulo, power, etc.)

When I write $$39\mod{5}=4$$
what I am saying is that there is some integer $k$ such that $$39=5k+4$$
Hence the only way I can make sense of units associated to the mod function is if all of $39, 5, 4$ have the same units (while $k$ is dimensionless).  Hence I would write $$39cm \mod{5 cm}=4cm$$
