hello.
Simple question, is it possible to simplify (or replace division or modulo by less-expensive operation)
(k/m)%n
where variables are integers and operators are C style division and modulo operators.
let me rephrase question slightly, except for case where variables are base2, under what conditions (e.g. some variable may be constant) can expression be simplified (or rephrased partially using base2 operations) to remove the division or modulo?
this is way for me to learn number theory, especially base2 tricks, rather than exercise in performance optimization
Thank you