The remainder() function returns the floating point remainder r = x - ny when y is non-zero. The value n is the integral value nearest the exact value x/y. When |n - x/y| = ½, the value n is chosen to be even.
The behavior of remainder() is independent of the rounding mode.