1
REAL FUNCTION SCASUM(N,CX,INCX)
2
* .. Scalar Arguments ..
5
* .. Array Arguments ..
12
* takes the sum of the absolute values of a complex vector and
13
* returns a single precision result.
14
* jack dongarra, linpack, 3/11/78.
15
* modified 3/93 to return if incx .le. 0.
16
* modified 12/3/93, array(1) declarations changed to array(*)
23
* .. Intrinsic Functions ..
24
INTRINSIC ABS,AIMAG,REAL
28
IF (N.LE.0 .OR. INCX.LE.0) RETURN
29
IF (INCX.EQ.1) GO TO 20
31
* code for increment not equal to 1
34
DO 10 I = 1,NINCX,INCX
35
STEMP = STEMP + ABS(REAL(CX(I))) + ABS(AIMAG(CX(I)))
40
* code for increment equal to 1
43
STEMP = STEMP + ABS(REAL(CX(I))) + ABS(AIMAG(CX(I)))