The compensated sum of a matrix.
s = accsum_fcompsum ( x ) [s,e] = accsum_fcompsum ( x )
a n-by-m matrix of doubles
a 1-by-1 matrix of doubles, the highest significant digits of the sum
a 1-by-1, matrix of doubles, the lowest significant digits of the sum
Returns the sum of x. Algorithm 4.4 in HFCC Due to Knuth No assumption on a , b Assumes that we uses round-to-nearest. This is a fast implementation, based on compiled source code..
s = accsum_fcompsum ( [2 1] ) // 3 s = accsum_fcompsum ( [1 2] ) // 3 // is 1+(%eps/2) but is 1 without algo s = accsum_fcompsum ( [1 %eps/2 ] ) // is 1+(%eps/2) but is 1 without algo s = accsum_fcompsum ( [%eps/2 1] )
"Stability and numerical accuracy of algorithms", Nicolas Higham
"Handbook of Floating Point Computations", Muller et al