In the CoffeeScript documentation on operators it says that you can use %% for true mathematical modulo, but there is no explanation as to why this is different from the "modulo operator" % in JavaScript.
Further down it says that a %% b in CoffeeScript is equivalent to writing (a % b + b) % b in JavaScript but this seem to produce the same results for most simple cases.