76 REAL FUNCTION SCNRM2(N,X,INCX)
94 parameter(one=1.0e+0,zero=0.0e+0)
97 REAL norm,scale,ssq,temp
101 INTRINSIC abs,aimag,real,sqrt
103 IF (n.LT.1 .OR. incx.LT.1)
THEN
112 DO 10 ix = 1,1 + (n-1)*incx,incx
113 IF (real(x(ix)).NE.zero)
THEN
114 temp = abs(real(x(ix)))
115 IF (scale.LT.temp)
THEN
116 ssq = one + ssq* (scale/temp)**2
119 ssq = ssq + (temp/scale)**2
122 IF (aimag(x(ix)).NE.zero)
THEN
123 temp = abs(aimag(x(ix)))
124 IF (scale.LT.temp)
THEN
125 ssq = one + ssq* (scale/temp)**2
128 ssq = ssq + (temp/scale)**2
132 norm = scale*sqrt(ssq)