<< accsum_scs Accsum accsum_twosum >>

Accsum >> Accsum > accsum_straight

accsum_straight

The straightforward sum of a matrix.

Calling Sequence

s = accsum_straight ( x )

Parameters

x :

a n-by-m matrix of doubles

s :

a 1-by-1, matrix of doubles, the sum

Description

Computes the sum by a straightforward sum. This is called "recursive summation" in SNAA.

Uses an unvectorized loop. This is a slow algorithm, used for comparison purposes only.

Caution! This function may not return the same value as the "sum" function of Scilab! This is because the Intel MKL or ATLAS may reorder the data, processing it block by block

Examples

x = 1:10;
accsum_straight(x)

Authors

Bibliography

"Stability and numerical accuracy of algorithms", Nicolas Higham

"Handbook of Floating Point Computations", Muller et al


<< accsum_scs Accsum accsum_twosum >>