1
double precision function dzasum(n,zx,incx)
3
c takes the sum of the absolute values.
4
c jack dongarra, 3/11/78.
5
c modified 3/93 to return if incx .le. 0.
6
c modified 12/3/93, array(1) declarations changed to array(*)
8
C $Id: dzasum.f 19695 2010-10-29 16:51:02Z d3y133 $
10
double precision stemp,dcabs1
15
if( n.le.0 .or. incx.le.0 )return
18
c code for increment not equal to 1
22
stemp = stemp + dcabs1(zx(ix))
28
c code for increment equal to 1
31
stemp = stemp + dcabs1(zx(i))
3
* =========== DOCUMENTATION ===========
5
* Online html documentation available at
6
* http://www.netlib.org/lapack/explore-html/
11
* DOUBLE PRECISION FUNCTION DZASUM(N,ZX,INCX)
13
* .. Scalar Arguments ..
16
* .. Array Arguments ..
26
*> DZASUM takes the sum of the absolute values.
32
*> \author Univ. of Tennessee
33
*> \author Univ. of California Berkeley
34
*> \author Univ. of Colorado Denver
37
*> \date November 2011
39
*> \ingroup double_blas_level1
41
*> \par Further Details:
42
* =====================
46
*> jack dongarra, 3/11/78.
47
*> modified 3/93 to return if incx .le. 0.
48
*> modified 12/3/93, array(1) declarations changed to array(*)
51
* =====================================================================
52
DOUBLE PRECISION FUNCTION DZASUM(N,ZX,INCX)
54
* -- Reference BLAS level1 routine (version 3.4.0) --
55
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
56
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
59
* .. Scalar Arguments ..
62
* .. Array Arguments ..
66
* =====================================================================
69
DOUBLE PRECISION STEMP
72
* .. External Functions ..
73
DOUBLE PRECISION DCABS1
78
IF (N.LE.0 .OR. INCX.LE.0) RETURN
81
* code for increment equal to 1
84
STEMP = STEMP + DCABS1(ZX(I))
88
* code for increment not equal to 1
92
STEMP = STEMP + DCABS1(ZX(I))