<< accsum_dblcompsum Accsum accsum_fasttwosum >>

Accsum >> Accsum > accsum_dcs

accsum_dcs

A Doubly Self Compensated Sum algorithm

Calling Sequence

s = accsum_dcs ( x )
[s,e] = accsum_dcs ( x )

Parameters

x :

a m-by-n, matrix of doubles

s :

a 1-by-1 matrix of doubles, the highest significant digits of the sum

e :

a 1-by-1, matrix of doubles, the lowest significant digits of the sum

Description

A Doubly Self Compensated Sum algorithm. Uses accsum_fasttwosum. The input data x must be ordered in decreasing magnitude. To do this, we may use the accsum_order function with order=5.

Examples

[s,e] = accsum_dcs ( [2 1] ) // 3
[s,e] = accsum_dcs ( [1 2] ) // 3
[s,e] = accsum_dcs ( [2 1] ) // 3
[s,e] = accsum_dcs ( [1 2] ) // 3
x = accsum_wilkinson(10); size(x,"*")
s = sum(x)
x = accsum_order ( x , 5 );
[s,e] = accsum_dcs ( x )
[s,e] = accsum_dcs ( x )

Authors

Bibliography

"Stability and numerical accuracy of algorithms", Nicolas Higham

"Handbook of Floating Point Computations", Muller et al

https://hpcrd.lbl.gov/SCG/ocean/NRS/ECMWF/img14.htm

https://hpcrd.lbl.gov/SCG/ocean/NRS/SCSsum.F


Report an issue
<< accsum_dblcompsum Accsum accsum_fasttwosum >>