3 ms·
> I remember Ada having two different operators REM and MOD which I think is the best language choice. According to Boute 1992, > The Ada Reference Manual com
by masklinn 5y ago
> I remember Ada having two different operators REM and MOD which I think is the best language choice.
According to Boute 1992,
> The Ada Reference Manual complements integer division (/) with two functions mod and rem. The first of these violates the division rule
so it doesn't so much have two different operators as one operator and one broken mess, and its one operator is the truncating division (C-style).
Also a quick check of the Hyperspec (or, again, Boute 1992) shows there are not two but 4 definitions based on rounding quotients, I think none of which "always returns a positive number" (which Python also does not do, incidentally).
There is a 5th definition, which Boute 1992 champions, for which the property asserted in the title holds.