3 ms·
Author missed a perfect chance to explore why there are at least 3 defensible ways to implement division-and-remainder, a la https://en.wikipedia.org/wiki/Modul
by jepler 10y ago
Author missed a perfect chance to explore why there are at least 3 defensible ways to implement division-and-remainder, a la https://en.wikipedia.org/wiki/Modulo_operation https://en.wikipedia.org/wiki/Modulo_operation
Personally, I favor euclidean; as wikipedia states, this is the usual definition in mathematics.
And, anyway, it could be worse; in C before C99, the result of %-modulo was implementation-defined!