asum(3F)
SASUM, DASUM, SCASUM, DZASUM - Sums the absolute value of elements in a real or complex vector
As shipped in IRIX 6.5.22. Last changed in IRIX 6.5.19.
NAME SASUM, DASUM, SCASUM, DZASUM - Sums the absolute value of elements in a real or complex vector SYNOPSIS Real sum = SASUM (n, x, incx) Double precision sum = DASUM (n, x, incx) Complex sum = SCASUM (n, x, incx) Double complex sum = DZASUM (n, x, incx) DESCRIPTION SASUM and DASUM sum the absolute values of the elements of a real vector, as follows: n sum <- ||x||1 = Sum |xi| i=1 where x is a real vector of length n. SCASUM and DZASUM sum the absolute values of the real and imaginary parts of the elements of a complex vector, as follows: sum <- ||Real(x)||1 + Imag(x)||1= n n Sum |Real(xi)| + Sum |Imag(xj)| i=1 j=1 where x is a complex vector of length n. These functions have the following arguments: sum Sum of values. SASUM: Real sum of the absolute values of the elements of x. DASUM: Double precision sum of the absolute values of the elements of x. SCASUM: Real sum of the absolute values of the real and imaginary parts of the elements of x. DZASUM: Double precision sum of the absolute values of the real and imaginary parts of the elements of x. n Integer. (input) Number of elements in the vector to be summed. If n <= 0, these routines return 0. x Array of dimension (n-1) * |incx| + 1. (input) SASUM: Real array. DASUM: Double precision array. SCASUM: Complex array. DZASUM: Double complex array. Array x contains the vector to be summed. incx Integer. (input) Increment between elements of x. If incx = 0, the results will be unpredictable. NOTES These routines are Level 1 Basic Linear Algebra Subprograms (Level 1 BLAS). When working backward (incx < 0), each routine starts at the end of the vector and moves backward, as follows: x(1-incx * (n-1)), x(1-incx * (n-2)), ..., x(1)