News for hackers. Stuff that matters.
Re:Nearly All Binary Searches and Mergesorts Are Broken (2006) by froh on Sunday November 06, 2022 @08:57AM (#33492682)
see "implementation issues" in the same article, with

  M = L + (R - L)/2
Re:Nearly All Binary Searches and Mergesorts Are Broken (2006) by david_allison on Sunday November 06, 2022 @09:03AM (#33492734)
I'm aware (plus the fact that the algorithm is correct in Python). It's very unlikely that this is an argument I can win.

I'm taking a pragmatic perspective: like it or not, people are going to skim the article and copy & paste the pseudocode.

Given that the pseudocode is buggy in the vast majority of programming languages and the user isn't informed about this in the pseudocode, it's going to lead to unnecessary bugs.

Re:Nearly All Binary Searches and Mergesorts Are Broken (2006) by enriquto on Sunday November 06, 2022 @09:13AM (#33492821)
> people are going to skim the article and copy & paste the pseudocode.

Heh. But then again, these kind of people will create way worse problems than last-bit overflows.