Modulo Bug?

David d at dav1d.de
Sat Aug 11 06:48:15 PDT 2012


-1 % 16 = -1

Shouldn't that be 15? It seems like the sign is ignored for the modulo.

Is this a bug or intended behaviour? The Python implementation returns 
here, as expected, 15.


More information about the Digitalmars-d mailing list