So for example, I would have divide(n, a,
I'd like to write a similar function for modulo but I can't think of a proper way of simplifying multiple operands to optimize the algorithm.
Here are the ideas I currently have, given that the additional arguments are numbered alphabetically.
- If b > a then skip b because n mod a mod b = n mod a
- If b | a then skip a because n mod a mod b = n mod b
- If n mod a is 0 then skip all following moduli












