Comment
Comment by rustybolt
I agree that binary search is prone to errors, but the overflow error is just calculating the midpoint as
I mean, that's technically true because it might crash for huge arrays, but if this is a bug then the follow implementation of a function that adds to integers is also buggy, since it will overflow when x + y doesn't fit in an int: