Нашёл в MATLAB:
The concept of remainder after division is not uniquely defined, and the two functions mod and rem each compute a different variation. The mod function produces a result that is either zero or has the same sign as the divisor. The rem function produces a result that is either zero or has the same sign as the dividend.
Another difference is the convention when the divisor is zero. The mod function follows the convention that mod(a,0) returns a, whereas the rem function follows the convention that rem(a,0) returns NaN.