Money in a double: 4.35 * 100 comes out 434
4 prices in every 100 are exact doubles. Across a million amounts the wrong kopeck only ever turned up on an exact half: 3656 of them at 18 percent, none at 20.
4 prices in every 100 are exact doubles. Across a million amounts the wrong kopeck only ever turned up on an exact half: 3656 of them at 18 percent, none at 20.
javac keeps the difference between x * 2 and x << 1. Nothing below javac keeps it in a form you can measure. The only multiply left in the compiled loop is one the compiler put there itself.
Mojibake is deterministic. 6 letters, 12 bytes and 5 code pages, plus a byte table that tells you which pair of encodings collided.
3 broken links in one chain give the same NullPointerException with an empty message. Option turns all 3 into None. Then the allocation counter says the Some costs nothing and it takes -XX:-DoEscapeAnalysis to find it.