3 ms·
It's an IEEE-754 oddity that Python chose to adopt for its equality. IEEE-754 does remainder(5, 3) = -1, whereas Python does 5 % 3 = 2. There's no reason to e
by paulddraper 7mo ago
It's an IEEE-754 oddity that Python chose to adopt for its equality.
IEEE-754 does remainder(5, 3) = -1, whereas Python does 5 % 3 = 2.
There's no reason to expect exact equivalence between operators.