83 SUBROUTINE crscl( N, A, X, INCX )
101 parameter( zero = 0.0e+0, one = 1.0e+0 )
104 REAL SAFMAX, SAFMIN, OV, AR, AI, ABSR, ABSI, UR
110 EXTERNAL slamch, cladiv
127 safmin = slamch(
'S' )
128 safmax = one / safmin
138 IF( ai.EQ.zero )
THEN
140 CALL csrscl( n, ar, x, incx )
142 ELSE IF( ar.EQ.zero )
THEN
145 IF( absi.GT.safmax )
THEN
146 CALL csscal( n, safmin, x, incx )
147 CALL cscal( n, cmplx( zero, -safmax / ai ), x, incx )
148 ELSE IF( absi.LT.safmin )
THEN
149 CALL cscal( n, cmplx( zero, -safmin / ai ), x, incx )
150 CALL csscal( n, safmax, x, incx )
152 CALL cscal( n, cmplx( zero, -one / ai ), x, incx )
163 ur = ar + ai * ( ai / ar )
164 ui = ai + ar * ( ar / ai )
166 IF( (abs( ur ).LT.safmin).OR.(abs( ui ).LT.safmin) )
THEN
168 CALL cscal( n, cmplx( safmin / ur, -safmin / ui ), x, incx )
169 CALL csscal( n, safmax, x, incx )
170 ELSE IF( (abs( ur ).GT.safmax).OR.(abs( ui ).GT.safmax) )
THEN
171 IF( (absr.GT.ov).OR.(absi.GT.ov) )
THEN
173 CALL cscal( n, cmplx( one / ur, -one / ui ), x, incx )
175 CALL csscal( n, safmin, x, incx )
176 IF( (abs( ur ).GT.ov).OR.(abs( ui ).GT.ov) )
THEN
178 IF( absr.GE.absi )
THEN
180 ur = (safmin * ar) + safmin * (ai * ( ai / ar ))
181 ui = (safmin * ai) + ar * ( (safmin * ar) / ai )
184 ur = (safmin * ar) + ai * ( (safmin * ai) / ar )
185 ui = (safmin * ai) + safmin * (ar * ( ar / ai ))
187 CALL cscal( n, cmplx( one / ur, -one / ui ), x, incx )
189 CALL cscal( n, cmplx( safmax / ur, -safmax / ui ),
194 CALL cscal( n, cmplx( one / ur, -one / ui ), x, incx )
subroutine crscl(n, a, x, incx)
CRSCL multiplies a vector by the reciprocal of a real scalar.
subroutine csrscl(n, sa, sx, incx)
CSRSCL multiplies a vector by the reciprocal of a real scalar.
subroutine csscal(n, sa, cx, incx)
CSSCAL
subroutine cscal(n, ca, cx, incx)
CSCAL