Sergey Litvinov added the comment:
mark.dickinson do you have an example of the Lib/bisect.py code
No. I was thinking about something hypothetical similar to the one you
provided.
rhettinger The textbook formula is more important in languages
rhettinger without something like Python long ints
New submission from Sergey Litvinov:
Bisection algorithms use
mid = (lo+hi)//2
Textbook formula is
mid = (hi-lo)//2 + lo
See
http://en.wikipedia.org/w/index.php?title=Binary_search_algorithmoldid=634658510#Arithmetic
For vanilla lists and integers it is not a problem but one can run