2 ms·
For those who were curious why these could both work: (A & B) | C differs from A & (B | C) in two cases: when A is false, C is true, and B is any value. But i
by thaumasiotes 7y ago
For those who were curious why these could both work:
(A & B) | C differs from A & (B | C) in two cases: when A is false, C is true, and B is any value.
But in this case in particular, those differences would create a bug when A is false (the year is not divisible by 4) at the same time that C is true (the year _is_ divisible by 400). Since that can't happen, the bug cannot occur.