122 DOUBLE PRECISION FUNCTION zlantp( NORM, UPLO, DIAG, N, AP,
130 CHARACTER diag, norm, uplo
134 DOUBLE PRECISION work( * )
141 DOUBLE PRECISION one, zero
142 parameter( one = 1.0d+0, zero = 0.0d+0 )
147 DOUBLE PRECISION scale, sum, value
163 ELSE IF(
lsame( norm,
'M' ) )
THEN
168 IF(
lsame( diag,
'U' ) )
THEN
170 IF(
lsame( uplo,
'U' ) )
THEN
172 DO 10 i = k, k + j - 2
174 IF(
VALUE .LT. sum .OR.
175 $
disnan( sum ) )
VALUE = sum
181 DO 30 i = k + 1, k + n - j
183 IF(
VALUE .LT. sum .OR.
184 $
disnan( sum ) )
VALUE = sum
191 IF(
lsame( uplo,
'U' ) )
THEN
193 DO 50 i = k, k + j - 1
195 IF(
VALUE .LT. sum .OR.
196 $
disnan( sum ) )
VALUE = sum
202 DO 70 i = k, k + n - j
204 IF(
VALUE .LT. sum .OR.
205 $
disnan( sum ) )
VALUE = sum
211 ELSE IF( (
lsame( norm,
'O' ) ) .OR. ( norm.EQ.
'1' ) )
THEN
217 udiag =
lsame( diag,
'U' )
218 IF(
lsame( uplo,
'U' ) )
THEN
222 DO 90 i = k, k + j - 2
223 sum = sum + abs( ap( i ) )
227 DO 100 i = k, k + j - 1
228 sum = sum + abs( ap( i ) )
232 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
238 DO 120 i = k + 1, k + n - j
239 sum = sum + abs( ap( i ) )
243 DO 130 i = k, k + n - j
244 sum = sum + abs( ap( i ) )
248 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
251 ELSE IF(
lsame( norm,
'I' ) )
THEN
256 IF(
lsame( uplo,
'U' ) )
THEN
257 IF(
lsame( diag,
'U' ) )
THEN
263 work( i ) = work( i ) + abs( ap( k ) )
274 work( i ) = work( i ) + abs( ap( k ) )
280 IF(
lsame( diag,
'U' ) )
THEN
287 work( i ) = work( i ) + abs( ap( k ) )
297 work( i ) = work( i ) + abs( ap( k ) )
306 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
308 ELSE IF( (
lsame( norm,
'F' ) ) .OR.
309 $ (
lsame( norm,
'E' ) ) )
THEN
313 IF(
lsame( uplo,
'U' ) )
THEN
314 IF(
lsame( diag,
'U' ) )
THEN
319 CALL zlassq( j-1, ap( k ), 1, scale, sum )
327 CALL zlassq( j, ap( k ), 1, scale, sum )
332 IF(
lsame( diag,
'U' ) )
THEN
337 CALL zlassq( n-j, ap( k ), 1, scale, sum )
345 CALL zlassq( n-j+1, ap( k ), 1, scale, sum )
350 VALUE = scale*sqrt( sum )
double precision function zlantp(norm, uplo, diag, n, ap, work)
ZLANTP returns the value of the 1-norm, or the Frobenius norm, or the infinity norm,...
subroutine zlassq(n, x, incx, scale, sumsq)
ZLASSQ updates a sum of squares represented in scaled form.