News for hackers. Stuff that matters.
Re:Mean of two floating point numbers can be dangerous by dingo_bat on Sunday June 05, 2016 @09:25AM (#11840823)
I think the more important lesson here is to not write algorithms in a way that go into recursion because data types aren't infinitely precise.
Re:Mean of two floating point numbers can be dangerous by thedufer on Sunday June 05, 2016 @05:12PM (#11843149)
The original didn't require infinite precision; rather, it required that the average of two different numbers be between the two or equal to the smaller one. This is true in integer arithmetic due to rounding down, but apparently not true for floating point.