accsum_orderdynamic Accsum accsum_straight

Accsum >> Accsum > accsum_scs

accsum_scs

A Self Compensated Sum algorithm

Calling Sequence

s = accsum_scs ( x )
[s,e] = accsum_scs ( 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 Self Compensated Sum algorithm. Uses accsum_fasttwosum.

Examples

[s,e] = accsum_scs ( [2 1] ) // 3
[s,e] = accsum_scs ( [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)
[s,e] = accsum_scs ( 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

accsum_orderdynamic Accsum accsum_straight