3 ms·
pawns - 1 would overflow. How big of a problem it is depends on the domain. I work with graphics where overflows happen all the time: you can find images large
by pornel 11y ago
pawns - 1 would overflow.
How big of a problem it is depends on the domain. I work with graphics where overflows happen all the time: you can find images large enough that width * height * constant doesn't fit in 31 bits. Image formats have 1-2 byte integers everywhere. You have to be careful with rounding and clamping pixels to avoid 255 white from flipping to 0 black, etc.