Modulo of a negative number - Mathematics Stack Exchange
It's calculated exactly like the mod of a positive number. In arithmetic modulo $c$, we seek to express any $x$ as $qc+r$, where $r$ must be a non-negative integer. Why don't we test it out with an example? Take $-100$ mod $8 = 4$. This is because $8 \...