4 ms·
Division by 195 is trivial. The answer is simply uint8_t div195(uint8_t x) { return x >= 195; }
by orlp 2y ago
Division by 195 is trivial. The answer is simply
uint8_t div195(uint8_t x) { return x >= 195; }
- zahlman 2y agoYes, but you can't incorporate that into an algorithm that allows the divisor to vary and avoids branching. 195 is problematic for the multiply-shift strategy.