Here's how I usually do it. For example, to calculate 1717 mod 2
:
1717 / 2
. The answer is 858.52
) to get 1716
1717
) minus the number you got from the previous step (1716
) -- 1717-1716=1
.So 1717 mod 2
is 1
.
To sum this up all you have to do is multiply the numbers before the decimal point with the mod then subtract it from the original number.