Error of the MOD function
MOD of y divided by x is defined as y - x INT(y/x) There is a case when the MOD function returns an erroneous result and that is when y is numerically equal to x but one is a positive number and the other is a negative number. This happens whether x and y are integers or decimal numbers.
For example, when y = 4, x= -4, MOD(4,-4) returns -4, when the correct answer is 0 using the definition formula, and
when y = -4, x =4, MOD(-4,4) returns 4, when the correct answer is again 0 using the definition formula.
MacBook Pro, macOS High Sierra (10.13.5)