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
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?