In the comments it says "The result has the same sign as the dividend."(ie x), apparently copied verbatim from the documentation for remainder, when it should say divisor(ie y), like it does in "Returns:".
online docs are out of date. This was fixed by Derek Parnell in e2ca56fa.