
Ruby Mod Operator Doesn't Work as Expected - evolvingdev
http://evolvingdeveloper.com/ruby-mod-operator-does-not-behave-as-expected/
======
jepler
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!

