News for hackers. Stuff that matters.
Re:Nearly All Binary Searches and Mergesorts Are Broken (2006) by admax88q on Tuesday August 01, 2017 @09:51PM (#14907250)
The problem is these sorts of things are trivia. They are things that sufficiently smart tooling should handle for us so people can spend time building higher level constructs and less time worrying about individual bits.

A smart compiler should have caught (a + b) / 2 and fixed it to be correct, there's no way the overflow situation is what the programmer wanted.

Re:Nearly All Binary Searches and Mergesorts Are Broken (2006) by throwaway91111 on Tuesday August 01, 2017 @09:53PM (#14907266)
"sufficiently smart tooling" has got to be one of the best jokes in programming.

On one hand, it is true that the tooling is possible. On the other hand, it remains an open problem.

Re:Nearly All Binary Searches and Mergesorts Are Broken (2006) by majewsky on Wednesday August 02, 2017 @07:27AM (#14909650)
Re:Nearly All Binary Searches and Mergesorts Are Broken (2006) by khedoros1 on Tuesday August 01, 2017 @10:39PM (#14907508)
I'd accept a warning, but a C compiler shouldn't be making guesses at what the programmer intended. In another language? Sure, if it's consistent with other behaviors in that language.