3 ms·
tl;dr - if you're adding two numbers in your algorithm (like finding the midpoint in a binary search), make sure their sum can be represented in the resultant t
by scriptedfate 11y ago
tl;dr - if you're adding two numbers in your algorithm (like finding the midpoint in a binary search), make sure their sum can be represented in the resultant type.
Basically: "watch out for overflows"
- brudgers 11y agoThe bug is subtle. It does not arise out of engineering failure, but rather is a byproduct of engineering success manifesting itself as a durable solution being used beyond any time frame anticipated in the specification. It's of a kind with Y2k or Y2038.