This works for any 2 numbers, integer or not, negative or positive! How it works: If you are subtracting the difference between y and x from x, then re-adding the y, the added y fills in the subtracted gap and also adds exactly x more.