3 ms·
I think any algorithm (even the usual one with division) would take hundreds of lines of comments if written in this style. There are thirty lines just to expla
by edflsafoiewq 6y ago
I think any algorithm (even the usual one with division) would take hundreds of lines of comments if written in this style. There are thirty lines just to explain -x % x. Myself, I'd rather see
uint64_t t = -s % s; // = (2^64 - s) % s = 2^64 % s
- tuananh 6y agoyep, this is a lot faster to digest and still juts as clear