I've asked for this before:   http://www.digitalmars.com/d/archives/digitalmars/D/Could_we_have_mod_in_std.math_152977.html


On Sat, Aug 11, 2012 at 11:12 AM, bearophile <bearophileHUGS@lycos.com> wrote:
>
> It's a localized but important design bug of languages like C that D has
> carried over for backward compatibility reasons. D % has caused bugs in my
> code. I suggest to not use the built-in % on numbers that can be negative,
> unless you really know what you are doing.
>
> Bye,
> bearophile