News for hackers. Stuff that matters.
Re:Go 1.27 Interactive Tour by _dain_ on Sunday August 02, 2026 @11:02AM (#49145296)
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.

Re:Go 1.27 Interactive Tour by inigyou on Sunday August 02, 2026 @02:05PM (#49146809)
64KiB was common in the 16-bit era, however