This is such a subtle problem that countless people implementing binary searches didn't think about it, yet you think reading an unlabeled blob of code will make people notice?
Yes, I think if programmers do not actually read code, they will not notice the bugs in it.
Considering the binary search more deeply, http://comjnl.oxfordjournals.org/content/26/2/154.full.pdf
is useful; De Angelos search (family 4) was a successful search, but it contains this bug. Implementations based on families 1 and 2 but perhaps trying to be less clever would not.
Considering the binary search more deeply, http://comjnl.oxfordjournals.org/content/26/2/154.full.pdf is useful; De Angelos search (family 4) was a successful search, but it contains this bug. Implementations based on families 1 and 2 but perhaps trying to be less clever would not.