Get correct sign of a MOD b when (a > 0) and (b < 0).
authorGeorge Koehler <xkernigh@netscape.net>
Sat, 28 Oct 2017 23:55:06 +0000 (19:55 -0400)
committerGeorge Koehler <xkernigh@netscape.net>
Sat, 28 Oct 2017 23:55:06 +0000 (19:55 -0400)
commit038fb6fb555a8a1c167af578f622f8f3cef5dcdb
tree57b3e1f971f8ef8ebd8ac5ee40913bdb10f3afdf
parent649410bb27db8f539815c5b8723de41f5863be81
Get correct sign of a MOD b when (a > 0) and (b < 0).

Reported by me in https://github.com/davidgiven/ack/issues/60

This doesn't change DIV.  Right now a DIV b does floor division and
a MOD b has the sign of b.  This is the same as Lua, Python, Ruby,
Tcl; but is different from other Modula-2 implementations.
lang/m2/comp/cstoper.c
lang/m2/libm2/dvi.c