Y
Hacker News
new
|
ask
|
show
|
jobs
by
edflsafoiewq
2445 days 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.