What you are doing is basic math:
5/2 = 2.5
2.5 -2 = 0.5
0.5 * 2 = 1
Now lets do it for 123123:
123123/2 = 61561.5
61561.5 - 2 = 61559.5
61559.5 * 2 = 123119
So we substracted 4 from 123123...
Now bigger divisor:
123123 / 4234 = 29.07959376476145
29.07959376476145 - 4234 = -4204.920406235239
-4204.920406235239 * 4234 = -17803633