Go to the source code of this file.
double precision function dznrm2 |
( |
integer |
N, |
|
|
complex*16, dimension(*) |
X, |
|
|
integer |
INCX |
|
) |
| |
DZNRM2
- Purpose:
DZNRM2 returns the euclidean norm of a vector via the function
name, so that
DZNRM2 := sqrt( x**H*x )
- Author
- Univ. of Tennessee
-
Univ. of California Berkeley
-
Univ. of Colorado Denver
-
NAG Ltd.
- Date
- November 2011
- Further Details:
-- This version written on 25-October-1982.
Modified on 14-October-1993 to inline the call to ZLASSQ.
Sven Hammarling, Nag Ltd.
Definition at line 56 of file dznrm2.f.
72 DOUBLE PRECISION one,zero
73 parameter(one=1.0d+0,zero=0.0d+0)
76 DOUBLE PRECISION norm,scale,ssq,temp
80 INTRINSIC abs,dble,dimag,sqrt
82 IF (n.LT.1 .OR. incx.LT.1)
THEN
91 DO 10 ix = 1,1 + (n-1)*incx,incx
92 IF (dble(x(ix)).NE.zero)
THEN
93 temp = abs(dble(x(ix)))
94 IF (scale.LT.temp)
THEN
95 ssq = one + ssq* (scale/temp)**2
98 ssq = ssq + (temp/scale)**2
101 IF (dimag(x(ix)).NE.zero)
THEN
102 temp = abs(dimag(x(ix)))
103 IF (scale.LT.temp)
THEN
104 ssq = one + ssq* (scale/temp)**2
107 ssq = ssq + (temp/scale)**2
111 norm = scale*sqrt(ssq)
double precision function dznrm2(N, X, INCX)
DZNRM2