114 DOUBLE PRECISION alpha, tau
117 DOUBLE PRECISION x( * )
123 DOUBLE PRECISION two, one, zero
124 parameter( two = 2.0d+0, one = 1.0d+0, zero = 0.0d+0 )
128 DOUBLE PRECISION beta, bignum, savealpha, smlnum, xnorm
147 xnorm =
dnrm2( n-1, x, incx )
149 IF( xnorm.EQ.zero )
THEN
153 IF( alpha.GE.zero )
THEN
163 x( 1 + (j-1)*incx ) = 0
171 beta = sign(
dlapy2( alpha, xnorm ), alpha )
174 IF( abs( beta ).LT.smlnum )
THEN
178 bignum = one / smlnum
181 CALL
dscal( n-1, bignum, x, incx )
184 IF( abs( beta ).LT.smlnum )
189 xnorm =
dnrm2( n-1, x, incx )
190 beta = sign(
dlapy2( alpha, xnorm ), alpha )
194 IF( beta.LT.zero )
THEN
198 alpha = xnorm * (xnorm/alpha)
203 IF ( abs(tau).LE.smlnum )
THEN
212 IF( savealpha.GE.zero )
THEN
217 x( 1 + (j-1)*incx ) = 0
226 CALL
dscal( n-1, one / alpha, x, incx )