07-20-2006, 09:00 PM
Did anyone else see the story recently about why almost all common sorting routines are broken?
The problem they were talking about was the average problem.
IE
(a+b)/2 .. Which fails when a+b make a number bigger than can fit the datatype.
The solution they recommended was
(a/2)+(b/2)
Does anyone know where this page was? I've been searching google, but can't find it. I found one page of interest, but it wasn't what I was looking for. Heres the one i found interesting anyway.
http://www.angelfire.com/pq/jamesbarbett...Broken.htm
The problem they were talking about was the average problem.
IE
(a+b)/2 .. Which fails when a+b make a number bigger than can fit the datatype.
The solution they recommended was
(a/2)+(b/2)
Does anyone know where this page was? I've been searching google, but can't find it. I found one page of interest, but it wasn't what I was looking for. Heres the one i found interesting anyway.
http://www.angelfire.com/pq/jamesbarbett...Broken.htm