| ▲ | kragen 4 days ago | |||||||
The overflow bug wasn't fixed until the 21st century; the comment you remember reading dates from before it was discovered. To be fair, in most computing environments, either indices don't overflow (Smalltalk, most Lisps) or arrays can never be big enough for the addition of two valid array indices to overflow, unless they are arrays of characters, which it would be sort of stupid to binary search. It only became a significant problem with LP64 and 64-bit Java. | ||||||||
| ▲ | eru 4 days ago | parent [-] | |||||||
Agreed. Your comment is mostly true, when you do binary search in something like an array, yes. But you can also do binary search in any monotonically increasing function. | ||||||||
| ||||||||