3 ms·
bound is unsigned and "the negative of an unsigned quantity is computed by subtracting its value from 2^n, where n is the number of bits in the promoted operand
by edflsafoiewq 7y ago
bound is unsigned and "the negative of an unsigned quantity is computed by subtracting its value from 2^n, where n is the number of bits in the promoted operand".
So it's doing (2^n - bound) % bound = 2^n % bound.