Binary search is harder to implement than it looks. "Although the basic idea of binary search is comparatively straightforward, the details can be surprisingly tricky…" — Donald Knuth.
Which bugs are most likely to be introduced into a new binary search implementation?