what is the difference between modulo and remainder
There is a difference between modulus and remainder. For example:
-21 mod 4 is 3 because -21 + 4 x 6 is 3.
-21
4
3
-21 + 4 x 6
But -21 divided by 4 gives -5 with a remainder of -1.
-5
-1
For positive values, there is no difference.
The modulo is the remainder when you have whole number division.
Read Melody's answer ....