I feel that this proposal should be urgently considered. A very long contribution has shown that almost all languages provide two operators, one giving the remainder with the same sign as the dividend, the other giving the modulus, with the same sign as the divisor. JS misses the latter, i.e. a %% b of same sign as b.

Because JS misses a modulo operator, several calendar ICU were bugged for many years. They were fixed only with ICU 68.

I love the proposal of %% operator, although Math.mod would already be a big step forward.

As for the algorithm, I think wise to use add or subtract divisor from dividend, until dividend is in the range 0..divisor (or divisor..0 if divisor < 0). This way you do not loose precision.

Searching for someone to bring the proposal ? I can do it.