1 DOUBLE PRECISION FUNCTION dnrm2 ( N, X, INCX )
5 DOUBLE PRECISION x( * )
21 DOUBLE PRECISION one , zero
22 parameter( one = 1.0d+0, zero = 0.0d+0 )
25 DOUBLE PRECISION absxi, norm,
scale, ssq
30 IF( n.LT.1 .OR. incx.LT.1 )
THEN
41 DO 10, ix = 1, 1 + ( n - 1 )*incx, incx
42 IF( x( ix ).NE.zero )
THEN
43 absxi = abs( x( ix ) )
44 IF(
scale.LT.absxi )
THEN
45 ssq = one + ssq*(
scale/absxi )**2
48 ssq = ssq + ( absxi/
scale )**2
52 norm =
scale * sqrt( ssq )
subroutine scale(xyzl, nl)
double precision function dnrm2(N, X, INCX)