Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
_dain_
55 days ago
|
parent
|
context
|
favorite
| on:
Go 1.27 Interactive Tour
IIRC it was overflow when you do (a + b) / 2 for the midpoint. It took so long to find because you need a >billion item array to overflow the 32-bit integer, and that much RAM wasn't common until the 00s.
The right way is a + (b - a)/2.
inigyou
55 days ago
[–]
64KiB was common in the 16-bit era, however
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
The right way is a + (b - a)/2.