in reply to Testing a number for oddness
One thing you have to remember is that these operations
are, at the perl layer,
not being done on an integer (or anything else that is
native to the underlying architecture) but on a
perl scalar value. I bet if you ran the same tests in C
(or assembler, or any language that was "right on the hardware")
and you were sure that modulus division wasn't part of the CPU's
instruction set (or produced as a side-effect of the div operation)
the results would be much more like you expected.