As most of us know, or should know, $-7 \equiv 1 \pmod 4$.
But if you use Java's modulus operator %, you get -3 for the answer, not 1. That's technically correct, but it can cause problems if you're not aware of this as you write a program. C# and Javascript are the same way.
Worse, there are varieties of BASIC which will give you the remainder of the absolute value, e.g., 3 for the example of $-7$; that's clearly wrong.
It looks like only Maple and Mathematica (and by extension, Wolfram Alpha) know better.
Why is this?
I believe that the primary justification for this is that division in these languages generally rounds towards 0 instead of towards -infinity when doing integer division (questionably) and they want to preserve the identity that
(a // b) * b + (a mod b) = a(rightly). From a mathematical standpoint I completely agree thata mod bshould always be in[0, b)and do question the original justification for this decision, however for compatibility it is unreasonable to try and change the standard now. Note that there are other languages beyond the ones you have mentioned, such as Python which do behave in this way.