It may come as a surprise but not all integer divisions are the same. Perhaps because we are used to operate mostly with positive numbers, we don’t pay too much attention to what happens when the modulo operator is used with negative integers. If you calculate the integer division of 7/3 in your favourite programming …
Read the full post →“Do you really know how to use the modulo operator?”