On Saturday, 18 October 2014 at 12:16:24 UTC, John Colvin wrote:writeln(a.kahanSum); // 111.157 writeln(a.sum); // -1272 writeln(a.sort().kahanSum); // 0Yes, but it is misleading, my test case was bad. Try to add a 1.0 element to the array.
Note: the sort should be over abs(x) to have an effect, but then we would need a different dataset since +N and -N will cancel out too easily.
