123 DOUBLE PRECISION FUNCTION dlantp( NORM, UPLO, DIAG, N, AP, WORK )
130 CHARACTER diag, norm, uplo
134 DOUBLE PRECISION ap( * ), work( * )
140 DOUBLE PRECISION one, zero
141 parameter( one = 1.0d+0, zero = 0.0d+0 )
146 DOUBLE PRECISION scale, sum, value
162 ELSE IF(
lsame( norm,
'M' ) )
THEN
167 IF(
lsame( diag,
'U' ) )
THEN
169 IF(
lsame( uplo,
'U' ) )
THEN
171 DO 10 i = k, k + j - 2
173 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
179 DO 30 i = k + 1, k + n - j
181 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
188 IF(
lsame( uplo,
'U' ) )
THEN
190 DO 50 i = k, k + j - 1
192 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
198 DO 70 i = k, k + n - j
200 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
206 ELSE IF( (
lsame( norm,
'O' ) ) .OR. ( norm.EQ.
'1' ) )
THEN
212 udiag =
lsame( diag,
'U' )
213 IF(
lsame( uplo,
'U' ) )
THEN
217 DO 90 i = k, k + j - 2
218 sum = sum + abs( ap( i ) )
222 DO 100 i = k, k + j - 1
223 sum = sum + abs( ap( i ) )
227 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
233 DO 120 i = k + 1, k + n - j
234 sum = sum + abs( ap( i ) )
238 DO 130 i = k, k + n - j
239 sum = sum + abs( ap( i ) )
243 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
246 ELSE IF(
lsame( norm,
'I' ) )
THEN
251 IF(
lsame( uplo,
'U' ) )
THEN
252 IF(
lsame( diag,
'U' ) )
THEN
258 work( i ) = work( i ) + abs( ap( k ) )
269 work( i ) = work( i ) + abs( ap( k ) )
275 IF(
lsame( diag,
'U' ) )
THEN
282 work( i ) = work( i ) + abs( ap( k ) )
292 work( i ) = work( i ) + abs( ap( k ) )
301 IF(
VALUE .LT. sum .OR.
disnan( sum ) )
VALUE = sum
303 ELSE IF( (
lsame( norm,
'F' ) ) .OR. (
lsame( norm,
'E' ) ) )
THEN
307 IF(
lsame( uplo,
'U' ) )
THEN
308 IF(
lsame( diag,
'U' ) )
THEN
313 CALL dlassq( j-1, ap( k ), 1, scale, sum )
321 CALL dlassq( j, ap( k ), 1, scale, sum )
326 IF(
lsame( diag,
'U' ) )
THEN
331 CALL dlassq( n-j, ap( k ), 1, scale, sum )
339 CALL dlassq( n-j+1, ap( k ), 1, scale, sum )
344 VALUE = scale*sqrt( sum )
logical function disnan(din)
DISNAN tests input for NaN.
double precision function dlantp(norm, uplo, diag, n, ap, work)
DLANTP returns the value of the 1-norm, or the Frobenius norm, or the infinity norm,...
subroutine dlassq(n, x, incx, scale, sumsq)
DLASSQ updates a sum of squares represented in scaled form.
logical function lsame(ca, cb)
LSAME