Upon reflection, I’m unsure what you mean by the program being simpler. What is your preferred way to represent modular addition? I could of course write down 20 % 11. I know exactly what that means. But first of all, this is not an algorithm. It just talks about the concept of modular arithmetic without specifying how to compute it. And understanding the concept at a high level is of course easier than representing the entire algorithm all at once in my mind.
I guess the normal way you would compute the modulo would be to take a number a and then subtract b from it until what is left is smaller than b. What is left is then the modulo. Ok, that seems simpler so never mind.
It does seem an important distinction to think about the way we represent a concept and the actual computation associated with obtaining the results associated with that concept. I got confused because I was conflating these two things.
Upon reflection, I’m unsure what you mean by the program being simpler. What is your preferred way to represent modular addition? I could of course write down
20 % 11
. I know exactly what that means. But first of all, this is not an algorithm. It just talks about the concept of modular arithmetic without specifying how to compute it. And understanding the concept at a high level is of course easier than representing the entire algorithm all at once in my mind.I guess the normal way you would compute the modulo would be to take a number a and then subtract b from it until what is left is smaller than b. What is left is then the modulo. Ok, that seems simpler so never mind.
It does seem an important distinction to think about the way we represent a concept and the actual computation associated with obtaining the results associated with that concept. I got confused because I was conflating these two things.