3 ms·
- Relying on undefined or implementation-specified behavior. Problems only show up years down the road. (example issue: expecting signed overflow to wraparound
by Strilanc 13y ago
- Relying on undefined or implementation-specified behavior. Problems only show up years down the road. (example issue: expecting signed overflow to wraparound in C)
- Avoiding statistical biases when transforming random values. Statistical unit tests are hard. (example issue: shuffling via lots of uniformly random swaps)
- Integer overflow ruining algorithms that would be correct, given unbounded integers. (example issue: average = (a+b)/2)
- Estragon 13y agoRegarding statistical biases, you can always pipe expected distributions through the test and compare to the expected transformed distribution using chi-squared.