Re: Accuracy of Statistical Functions

We have discussed summing algorithms a number of times before
(see, for example)
and it is a hard problem.

Sorting works great if and if only all the numbers have the same sign.
If not, I do not currently know what is best.  In fact, all the simple
we have thought up have been immediately met with a counter example.

Whatever is best, probably involves looking for subsets whose (true) sum
is small.  That would be very expensive.

Notice, though, that in your example, the best order is the more or less
*reverse* sorted, i.e., start with the absolute biggest.  Then the largest
numbers cancel out nicely.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]