1 *> \brief \b ZLATRS solves a triangular system of equations with the scale factor set to prevent overflow.
3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
9 *> Download ZLATRS + dependencies
10 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlatrs.f">
12 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlatrs.f">
14 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlatrs.f">
21 * SUBROUTINE ZLATRS( UPLO, TRANS, DIAG, NORMIN, N, A, LDA, X, SCALE,
24 * .. Scalar Arguments ..
25 * CHARACTER DIAG, NORMIN, TRANS, UPLO
26 * INTEGER INFO, LDA, N
27 * DOUBLE PRECISION SCALE
29 * .. Array Arguments ..
30 * DOUBLE PRECISION CNORM( * )
31 * COMPLEX*16 A( LDA, * ), X( * )
40 *> ZLATRS solves one of the triangular systems
42 *> A * x = s*b, A**T * x = s*b, or A**H * x = s*b,
44 *> with scaling to prevent overflow. Here A is an upper or lower
45 *> triangular matrix, A**T denotes the transpose of A, A**H denotes the
46 *> conjugate transpose of A, x and b are n-element vectors, and s is a
47 *> scaling factor, usually less than or equal to 1, chosen so that the
48 *> components of x will be less than the overflow threshold. If the
49 *> unscaled problem will not cause overflow, the Level 2 BLAS routine
50 *> ZTRSV is called. If the matrix A is singular (A(j,j) = 0 for some j),
51 *> then s is set to 0 and a non-trivial solution to A*x = 0 is returned.
59 *> UPLO is CHARACTER*1
60 *> Specifies whether the matrix A is upper or lower triangular.
61 *> = 'U': Upper triangular
62 *> = 'L': Lower triangular
67 *> TRANS is CHARACTER*1
68 *> Specifies the operation applied to A.
69 *> = 'N': Solve A * x = s*b (No transpose)
70 *> = 'T': Solve A**T * x = s*b (Transpose)
71 *> = 'C': Solve A**H * x = s*b (Conjugate transpose)
76 *> DIAG is CHARACTER*1
77 *> Specifies whether or not the matrix A is unit triangular.
78 *> = 'N': Non-unit triangular
79 *> = 'U': Unit triangular
84 *> NORMIN is CHARACTER*1
85 *> Specifies whether CNORM has been set or not.
86 *> = 'Y': CNORM contains the column norms on entry
87 *> = 'N': CNORM is not set on entry. On exit, the norms will
88 *> be computed and stored in CNORM.
94 *> The order of the matrix A. N >= 0.
99 *> A is COMPLEX*16 array, dimension (LDA,N)
100 *> The triangular matrix A. If UPLO = 'U', the leading n by n
101 *> upper triangular part of the array A contains the upper
102 *> triangular matrix, and the strictly lower triangular part of
103 *> A is not referenced. If UPLO = 'L', the leading n by n lower
104 *> triangular part of the array A contains the lower triangular
105 *> matrix, and the strictly upper triangular part of A is not
106 *> referenced. If DIAG = 'U', the diagonal elements of A are
107 *> also not referenced and are assumed to be 1.
113 *> The leading dimension of the array A. LDA >= max (1,N).
118 *> X is COMPLEX*16 array, dimension (N)
119 *> On entry, the right hand side b of the triangular system.
120 *> On exit, X is overwritten by the solution vector x.
125 *> SCALE is DOUBLE PRECISION
126 *> The scaling factor s for the triangular system
127 *> A * x = s*b, A**T * x = s*b, or A**H * x = s*b.
128 *> If SCALE = 0, the matrix A is singular or badly scaled, and
129 *> the vector x is an exact or approximate solution to A*x = 0.
132 *> \param[in,out] CNORM
134 *> CNORM is DOUBLE PRECISION array, dimension (N)
136 *> If NORMIN = 'Y', CNORM is an input argument and CNORM(j)
137 *> contains the norm of the off-diagonal part of the j-th column
138 *> of A. If TRANS = 'N', CNORM(j) must be greater than or equal
139 *> to the infinity-norm, and if TRANS = 'T' or 'C', CNORM(j)
140 *> must be greater than or equal to the 1-norm.
142 *> If NORMIN = 'N', CNORM is an output argument and CNORM(j)
143 *> returns the 1-norm of the offdiagonal part of the j-th column
150 *> = 0: successful exit
151 *> < 0: if INFO = -k, the k-th argument had an illegal value
157 *> \author Univ. of Tennessee
158 *> \author Univ. of California Berkeley
159 *> \author Univ. of Colorado Denver
162 *> \date September 2012
164 *> \ingroup complex16OTHERauxiliary
166 *> \par Further Details:
167 * =====================
171 *> A rough bound on x is computed; if that is less than overflow, ZTRSV
172 *> is called, otherwise, specific code is used which checks for possible
173 *> overflow or divide-by-zero at every operation.
175 *> A columnwise scheme is used for solving A*x = b. The basic algorithm
176 *> if A is lower triangular is
180 *> x(j) := x(j) / A(j,j)
181 *> x[j+1:n] := x[j+1:n] - x(j) * A[j+1:n,j]
184 *> Define bounds on the components of x after j iterations of the loop:
185 *> M(j) = bound on x[1:j]
186 *> G(j) = bound on x[j+1:n]
187 *> Initially, let M(0) = 0 and G(0) = max{x(i), i=1,...,n}.
189 *> Then for iteration j+1 we have
190 *> M(j+1) <= G(j) / | A(j+1,j+1) |
191 *> G(j+1) <= G(j) + M(j+1) * | A[j+2:n,j+1] |
192 *> <= G(j) ( 1 + CNORM(j+1) / | A(j+1,j+1) | )
194 *> where CNORM(j+1) is greater than or equal to the infinity-norm of
195 *> column j+1 of A, not counting the diagonal. Hence
197 *> G(j) <= G(0) product ( 1 + CNORM(i) / | A(i,i) | )
201 *> |x(j)| <= ( G(0) / |A(j,j)| ) product ( 1 + CNORM(i) / |A(i,i)| )
204 *> Since |x(j)| <= M(j), we use the Level 2 BLAS routine ZTRSV if the
205 *> reciprocal of the largest M(j), j=1,..,n, is larger than
206 *> max(underflow, 1/overflow).
208 *> The bound on x(j) is also used to determine when a step in the
209 *> columnwise method can be performed without fear of overflow. If
210 *> the computed bound is greater than a large constant, x is scaled to
211 *> prevent overflow, but if the bound overflows, x is set to 0, x(j) to
212 *> 1, and scale to 0, and a non-trivial solution to A*x = 0 is found.
214 *> Similarly, a row-wise scheme is used to solve A**T *x = b or
215 *> A**H *x = b. The basic algorithm for A upper triangular is
218 *> x(j) := ( b(j) - A[1:j-1,j]' * x[1:j-1] ) / A(j,j)
221 *> We simultaneously compute two bounds
222 *> G(j) = bound on ( b(i) - A[1:i-1,i]' * x[1:i-1] ), 1<=i<=j
223 *> M(j) = bound on x(i), 1<=i<=j
225 *> The initial values are G(0) = 0, M(0) = max{b(i), i=1,..,n}, and we
226 *> add the constraint G(j) >= G(j-1) and M(j) >= M(j-1) for j >= 1.
227 *> Then the bound on x(j) is
229 *> M(j) <= M(j-1) * ( 1 + CNORM(j) ) / | A(j,j) |
231 *> <= M(0) * product ( ( 1 + CNORM(i) ) / |A(i,i)| )
234 *> and we can safely call ZTRSV if 1/M(n) and 1/G(n) are both greater
235 *> than max(underflow, 1/overflow).
238 * =====================================================================
239 SUBROUTINE ZLATRS( UPLO, TRANS, DIAG, NORMIN, N, A, LDA, X, SCALE,
242 * -- LAPACK auxiliary routine (version 3.4.2) --
243 * -- LAPACK is a software package provided by Univ. of Tennessee, --
244 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
247 * .. Scalar Arguments ..
248 CHARACTER DIAG, NORMIN, TRANS, UPLO
250 DOUBLE PRECISION SCALE
252 * .. Array Arguments ..
253 DOUBLE PRECISION CNORM( * )
254 COMPLEX*16 A( LDA, * ), X( * )
257 * =====================================================================
260 DOUBLE PRECISION ZERO, HALF, ONE, TWO
261 PARAMETER ( ZERO = 0.0D+0, HALF = 0.5D+0, ONE = 1.0D+0,
264 * .. Local Scalars ..
265 LOGICAL NOTRAN, NOUNIT, UPPER
266 INTEGER I, IMAX, J, JFIRST, JINC, JLAST
267 DOUBLE PRECISION BIGNUM, GROW, REC, SMLNUM, TJJ, TMAX, TSCAL,
269 COMPLEX*16 CSUMJ, TJJS, USCAL, ZDUM
271 * .. External Functions ..
273 INTEGER IDAMAX, IZAMAX
274 DOUBLE PRECISION DLAMCH, DZASUM
275 COMPLEX*16 ZDOTC, ZDOTU, ZLADIV
276 EXTERNAL LSAME, IDAMAX, IZAMAX, DLAMCH, DZASUM, ZDOTC,
279 * .. External Subroutines ..
280 EXTERNAL DSCAL, XERBLA, ZAXPY, ZDSCAL, ZTRSV
282 * .. Intrinsic Functions ..
283 INTRINSIC ABS, DBLE, DCMPLX, DCONJG, DIMAG, MAX, MIN
285 * .. Statement Functions ..
286 DOUBLE PRECISION CABS1, CABS2
288 * .. Statement Function definitions ..
289 CABS1( ZDUM ) = ABS( DBLE( ZDUM ) ) + ABS( DIMAG( ZDUM ) )
290 CABS2( ZDUM ) = ABS( DBLE( ZDUM ) / 2.D0 ) +
291 $ ABS( DIMAG( ZDUM ) / 2.D0 )
293 * .. Executable Statements ..
296 UPPER = LSAME( UPLO, 'U' )
297 NOTRAN = LSAME( TRANS, 'N' )
298 NOUNIT = LSAME( DIAG, 'N' )
300 * Test the input parameters.
302 IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
304 ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) .AND. .NOT.
305 $ LSAME( TRANS, 'C' ) ) THEN
307 ELSE IF( .NOT.NOUNIT .AND. .NOT.LSAME( DIAG, 'U' ) ) THEN
309 ELSE IF( .NOT.LSAME( NORMIN, 'Y' ) .AND. .NOT.
310 $ LSAME( NORMIN, 'N' ) ) THEN
312 ELSE IF( N.LT.0 ) THEN
314 ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
318 CALL XERBLA( 'ZLATRS', -INFO )
322 * Quick return if possible
327 * Determine machine dependent parameters to control overflow.
329 SMLNUM = DLAMCH( 'Safe minimum' )
330 BIGNUM = ONE / SMLNUM
331 CALL DLABAD( SMLNUM, BIGNUM )
332 SMLNUM = SMLNUM / DLAMCH( 'Precision' )
333 BIGNUM = ONE / SMLNUM
336 IF( LSAME( NORMIN, 'N' ) ) THEN
338 * Compute the 1-norm of each column, not including the diagonal.
342 * A is upper triangular.
345 CNORM( J ) = DZASUM( J-1, A( 1, J ), 1 )
349 * A is lower triangular.
352 CNORM( J ) = DZASUM( N-J, A( J+1, J ), 1 )
358 * Scale the column norms by TSCAL if the maximum element in CNORM is
359 * greater than BIGNUM/2.
361 IMAX = IDAMAX( N, CNORM, 1 )
363 IF( TMAX.LE.BIGNUM*HALF ) THEN
366 TSCAL = HALF / ( SMLNUM*TMAX )
367 CALL DSCAL( N, TSCAL, CNORM, 1 )
370 * Compute a bound on the computed solution vector to see if the
371 * Level 2 BLAS routine ZTRSV can be used.
375 XMAX = MAX( XMAX, CABS2( X( J ) ) )
381 * Compute the growth in A * x = b.
393 IF( TSCAL.NE.ONE ) THEN
400 * A is non-unit triangular.
402 * Compute GROW = 1/G(j) and XBND = 1/M(j).
403 * Initially, G(0) = max{x(i), i=1,...,n}.
405 GROW = HALF / MAX( XBND, SMLNUM )
407 DO 40 J = JFIRST, JLAST, JINC
409 * Exit the loop if the growth factor is too small.
417 IF( TJJ.GE.SMLNUM ) THEN
419 * M(j) = G(j-1) / abs(A(j,j))
421 XBND = MIN( XBND, MIN( ONE, TJJ )*GROW )
424 * M(j) could overflow, set XBND to 0.
429 IF( TJJ+CNORM( J ).GE.SMLNUM ) THEN
431 * G(j) = G(j-1)*( 1 + CNORM(j) / abs(A(j,j)) )
433 GROW = GROW*( TJJ / ( TJJ+CNORM( J ) ) )
436 * G(j) could overflow, set GROW to 0.
444 * A is unit triangular.
446 * Compute GROW = 1/G(j), where G(0) = max{x(i), i=1,...,n}.
448 GROW = MIN( ONE, HALF / MAX( XBND, SMLNUM ) )
449 DO 50 J = JFIRST, JLAST, JINC
451 * Exit the loop if the growth factor is too small.
456 * G(j) = G(j-1)*( 1 + CNORM(j) )
458 GROW = GROW*( ONE / ( ONE+CNORM( J ) ) )
465 * Compute the growth in A**T * x = b or A**H * x = b.
477 IF( TSCAL.NE.ONE ) THEN
484 * A is non-unit triangular.
486 * Compute GROW = 1/G(j) and XBND = 1/M(j).
487 * Initially, M(0) = max{x(i), i=1,...,n}.
489 GROW = HALF / MAX( XBND, SMLNUM )
491 DO 70 J = JFIRST, JLAST, JINC
493 * Exit the loop if the growth factor is too small.
498 * G(j) = max( G(j-1), M(j-1)*( 1 + CNORM(j) ) )
500 XJ = ONE + CNORM( J )
501 GROW = MIN( GROW, XBND / XJ )
506 IF( TJJ.GE.SMLNUM ) THEN
508 * M(j) = M(j-1)*( 1 + CNORM(j) ) / abs(A(j,j))
511 $ XBND = XBND*( TJJ / XJ )
514 * M(j) could overflow, set XBND to 0.
519 GROW = MIN( GROW, XBND )
522 * A is unit triangular.
524 * Compute GROW = 1/G(j), where G(0) = max{x(i), i=1,...,n}.
526 GROW = MIN( ONE, HALF / MAX( XBND, SMLNUM ) )
527 DO 80 J = JFIRST, JLAST, JINC
529 * Exit the loop if the growth factor is too small.
534 * G(j) = ( 1 + CNORM(j) )*G(j-1)
536 XJ = ONE + CNORM( J )
543 IF( ( GROW*TSCAL ).GT.SMLNUM ) THEN
545 * Use the Level 2 BLAS solve if the reciprocal of the bound on
546 * elements of X is not too small.
548 CALL ZTRSV( UPLO, TRANS, DIAG, N, A, LDA, X, 1 )
551 * Use a Level 1 BLAS solve, scaling intermediate results.
553 IF( XMAX.GT.BIGNUM*HALF ) THEN
555 * Scale X so that its components are less than or equal to
556 * BIGNUM in absolute value.
558 SCALE = ( BIGNUM*HALF ) / XMAX
559 CALL ZDSCAL( N, SCALE, X, 1 )
569 DO 120 J = JFIRST, JLAST, JINC
571 * Compute x(j) = b(j) / A(j,j), scaling x if necessary.
575 TJJS = A( J, J )*TSCAL
582 IF( TJJ.GT.SMLNUM ) THEN
584 * abs(A(j,j)) > SMLNUM:
586 IF( TJJ.LT.ONE ) THEN
587 IF( XJ.GT.TJJ*BIGNUM ) THEN
592 CALL ZDSCAL( N, REC, X, 1 )
597 X( J ) = ZLADIV( X( J ), TJJS )
599 ELSE IF( TJJ.GT.ZERO ) THEN
601 * 0 < abs(A(j,j)) <= SMLNUM:
603 IF( XJ.GT.TJJ*BIGNUM ) THEN
605 * Scale x by (1/abs(x(j)))*abs(A(j,j))*BIGNUM
606 * to avoid overflow when dividing by A(j,j).
608 REC = ( TJJ*BIGNUM ) / XJ
609 IF( CNORM( J ).GT.ONE ) THEN
611 * Scale by 1/CNORM(j) to avoid overflow when
612 * multiplying x(j) times column j.
614 REC = REC / CNORM( J )
616 CALL ZDSCAL( N, REC, X, 1 )
620 X( J ) = ZLADIV( X( J ), TJJS )
624 * A(j,j) = 0: Set x(1:n) = 0, x(j) = 1, and
625 * scale = 0, and compute a solution to A*x = 0.
637 * Scale x if necessary to avoid overflow when adding a
638 * multiple of column j of A.
642 IF( CNORM( J ).GT.( BIGNUM-XMAX )*REC ) THEN
644 * Scale x by 1/(2*abs(x(j))).
647 CALL ZDSCAL( N, REC, X, 1 )
650 ELSE IF( XJ*CNORM( J ).GT.( BIGNUM-XMAX ) ) THEN
654 CALL ZDSCAL( N, HALF, X, 1 )
662 * x(1:j-1) := x(1:j-1) - x(j) * A(1:j-1,j)
664 CALL ZAXPY( J-1, -X( J )*TSCAL, A( 1, J ), 1, X,
666 I = IZAMAX( J-1, X, 1 )
667 XMAX = CABS1( X( I ) )
673 * x(j+1:n) := x(j+1:n) - x(j) * A(j+1:n,j)
675 CALL ZAXPY( N-J, -X( J )*TSCAL, A( J+1, J ), 1,
677 I = J + IZAMAX( N-J, X( J+1 ), 1 )
678 XMAX = CABS1( X( I ) )
683 ELSE IF( LSAME( TRANS, 'T' ) ) THEN
687 DO 170 J = JFIRST, JLAST, JINC
689 * Compute x(j) = b(j) - sum A(k,j)*x(k).
694 REC = ONE / MAX( XMAX, ONE )
695 IF( CNORM( J ).GT.( BIGNUM-XJ )*REC ) THEN
697 * If x(j) could overflow, scale x by 1/(2*XMAX).
701 TJJS = A( J, J )*TSCAL
706 IF( TJJ.GT.ONE ) THEN
708 * Divide by A(j,j) when scaling x if A(j,j) > 1.
710 REC = MIN( ONE, REC*TJJ )
711 USCAL = ZLADIV( USCAL, TJJS )
713 IF( REC.LT.ONE ) THEN
714 CALL ZDSCAL( N, REC, X, 1 )
721 IF( USCAL.EQ.DCMPLX( ONE ) ) THEN
723 * If the scaling needed for A in the dot product is 1,
724 * call ZDOTU to perform the dot product.
727 CSUMJ = ZDOTU( J-1, A( 1, J ), 1, X, 1 )
728 ELSE IF( J.LT.N ) THEN
729 CSUMJ = ZDOTU( N-J, A( J+1, J ), 1, X( J+1 ), 1 )
733 * Otherwise, use in-line code for the dot product.
737 CSUMJ = CSUMJ + ( A( I, J )*USCAL )*X( I )
739 ELSE IF( J.LT.N ) THEN
741 CSUMJ = CSUMJ + ( A( I, J )*USCAL )*X( I )
746 IF( USCAL.EQ.DCMPLX( TSCAL ) ) THEN
748 * Compute x(j) := ( x(j) - CSUMJ ) / A(j,j) if 1/A(j,j)
749 * was not used to scale the dotproduct.
751 X( J ) = X( J ) - CSUMJ
754 TJJS = A( J, J )*TSCAL
761 * Compute x(j) = x(j) / A(j,j), scaling if necessary.
764 IF( TJJ.GT.SMLNUM ) THEN
766 * abs(A(j,j)) > SMLNUM:
768 IF( TJJ.LT.ONE ) THEN
769 IF( XJ.GT.TJJ*BIGNUM ) THEN
771 * Scale X by 1/abs(x(j)).
774 CALL ZDSCAL( N, REC, X, 1 )
779 X( J ) = ZLADIV( X( J ), TJJS )
780 ELSE IF( TJJ.GT.ZERO ) THEN
782 * 0 < abs(A(j,j)) <= SMLNUM:
784 IF( XJ.GT.TJJ*BIGNUM ) THEN
786 * Scale x by (1/abs(x(j)))*abs(A(j,j))*BIGNUM.
788 REC = ( TJJ*BIGNUM ) / XJ
789 CALL ZDSCAL( N, REC, X, 1 )
793 X( J ) = ZLADIV( X( J ), TJJS )
796 * A(j,j) = 0: Set x(1:n) = 0, x(j) = 1, and
797 * scale = 0 and compute a solution to A**T *x = 0.
809 * Compute x(j) := x(j) / A(j,j) - CSUMJ if the dot
810 * product has already been divided by 1/A(j,j).
812 X( J ) = ZLADIV( X( J ), TJJS ) - CSUMJ
814 XMAX = MAX( XMAX, CABS1( X( J ) ) )
821 DO 220 J = JFIRST, JLAST, JINC
823 * Compute x(j) = b(j) - sum A(k,j)*x(k).
828 REC = ONE / MAX( XMAX, ONE )
829 IF( CNORM( J ).GT.( BIGNUM-XJ )*REC ) THEN
831 * If x(j) could overflow, scale x by 1/(2*XMAX).
835 TJJS = DCONJG( A( J, J ) )*TSCAL
840 IF( TJJ.GT.ONE ) THEN
842 * Divide by A(j,j) when scaling x if A(j,j) > 1.
844 REC = MIN( ONE, REC*TJJ )
845 USCAL = ZLADIV( USCAL, TJJS )
847 IF( REC.LT.ONE ) THEN
848 CALL ZDSCAL( N, REC, X, 1 )
855 IF( USCAL.EQ.DCMPLX( ONE ) ) THEN
857 * If the scaling needed for A in the dot product is 1,
858 * call ZDOTC to perform the dot product.
861 CSUMJ = ZDOTC( J-1, A( 1, J ), 1, X, 1 )
862 ELSE IF( J.LT.N ) THEN
863 CSUMJ = ZDOTC( N-J, A( J+1, J ), 1, X( J+1 ), 1 )
867 * Otherwise, use in-line code for the dot product.
871 CSUMJ = CSUMJ + ( DCONJG( A( I, J ) )*USCAL )*
874 ELSE IF( J.LT.N ) THEN
876 CSUMJ = CSUMJ + ( DCONJG( A( I, J ) )*USCAL )*
882 IF( USCAL.EQ.DCMPLX( TSCAL ) ) THEN
884 * Compute x(j) := ( x(j) - CSUMJ ) / A(j,j) if 1/A(j,j)
885 * was not used to scale the dotproduct.
887 X( J ) = X( J ) - CSUMJ
890 TJJS = DCONJG( A( J, J ) )*TSCAL
897 * Compute x(j) = x(j) / A(j,j), scaling if necessary.
900 IF( TJJ.GT.SMLNUM ) THEN
902 * abs(A(j,j)) > SMLNUM:
904 IF( TJJ.LT.ONE ) THEN
905 IF( XJ.GT.TJJ*BIGNUM ) THEN
907 * Scale X by 1/abs(x(j)).
910 CALL ZDSCAL( N, REC, X, 1 )
915 X( J ) = ZLADIV( X( J ), TJJS )
916 ELSE IF( TJJ.GT.ZERO ) THEN
918 * 0 < abs(A(j,j)) <= SMLNUM:
920 IF( XJ.GT.TJJ*BIGNUM ) THEN
922 * Scale x by (1/abs(x(j)))*abs(A(j,j))*BIGNUM.
924 REC = ( TJJ*BIGNUM ) / XJ
925 CALL ZDSCAL( N, REC, X, 1 )
929 X( J ) = ZLADIV( X( J ), TJJS )
932 * A(j,j) = 0: Set x(1:n) = 0, x(j) = 1, and
933 * scale = 0 and compute a solution to A**H *x = 0.
945 * Compute x(j) := x(j) / A(j,j) - CSUMJ if the dot
946 * product has already been divided by 1/A(j,j).
948 X( J ) = ZLADIV( X( J ), TJJS ) - CSUMJ
950 XMAX = MAX( XMAX, CABS1( X( J ) ) )
953 SCALE = SCALE / TSCAL
956 * Scale the column norms by 1/TSCAL for return.
958 IF( TSCAL.NE.ONE ) THEN
959 CALL DSCAL( N, ONE / TSCAL, CNORM, 1 )