Skip to content
Prev 170933 / 398503 Next

cumsum vs. sum

G'day all,

On Wed, 18 Feb 2009 12:41:27 -0500
Stavros Macrakis <macrakis at alum.mit.edu> wrote:

            
Hmm, I did not look at the source code but, potentially, sum() could
use some tricks to reduce rounding errors further that would not be
available to cumsum(); e.g. sorting the data before adding summing
them; or grouping them into groups of roughly similar magnitude and
then sum group-by-group.  So it does may be counter-productive to use
the same method.....
But this is already documented, isn't it?  FAQ 7.31. ;-))

Cheers,

	Berwin