Re:The Misfortunes of a Trio of Mathematicians Using Compute...
by the_one_smiley on Friday October 24, 2014 @07:57PM
(#8506598)
The number of people who add up arrays of floating point numbers and don't know about Kahan summation is really incredible.
...I think you'll want to use a priority queue, with the smallest numbers on top, adding the first two, and then pushing the result back onto the priority queue. Repeat until you only have one item left.