125 DOUBLE PRECISION FUNCTION dlantp( NORM, UPLO, DIAG, N, AP, WORK )
133 CHARACTER diag, norm, uplo
137 DOUBLE PRECISION ap( * ), work( * )
143 DOUBLE PRECISION one, zero
144 parameter( one = 1.0d+0, zero = 0.0d+0 )
149 DOUBLE PRECISION scale, sum, value
165 ELSE IF(
lsame( norm,
'M' ) )
THEN
170 IF(
lsame( diag,
'U' ) )
THEN
172 IF(
lsame( uplo,
'U' ) )
THEN
174 DO 10 i = k, k + j - 2
176 IF( value .LT. sum .OR.
disnan( sum ) ) value = sum
182 DO 30 i = k + 1, k + n - j
184 IF( value .LT. sum .OR.
disnan( sum ) ) value = sum
191 IF(
lsame( uplo,
'U' ) )
THEN
193 DO 50 i = k, k + j - 1
195 IF( value .LT. sum .OR.
disnan( sum ) ) value = sum
201 DO 70 i = k, k + n - j
203 IF( value .LT. sum .OR.
disnan( sum ) ) value = sum
209 ELSE IF( (
lsame( norm,
'O' ) ) .OR. ( norm.EQ.
'1' ) )
THEN
215 udiag =
lsame( diag,
'U' )
216 IF(
lsame( uplo,
'U' ) )
THEN
220 DO 90 i = k, k + j - 2
221 sum = sum + abs( ap( i ) )
225 DO 100 i = k, k + j - 1
226 sum = sum + abs( ap( i ) )
230 IF( value .LT. sum .OR.
disnan( sum ) ) value = sum
236 DO 120 i = k + 1, k + n - j
237 sum = sum + abs( ap( i ) )
241 DO 130 i = k, k + n - j
242 sum = sum + abs( ap( i ) )
246 IF( value .LT. sum .OR.
disnan( sum ) ) value = sum
249 ELSE IF(
lsame( norm,
'I' ) )
THEN
254 IF(
lsame( uplo,
'U' ) )
THEN
255 IF(
lsame( diag,
'U' ) )
THEN
261 work( i ) = work( i ) + abs( ap( k ) )
272 work( i ) = work( i ) + abs( ap( k ) )
278 IF(
lsame( diag,
'U' ) )
THEN
285 work( i ) = work( i ) + abs( ap( k ) )
295 work( i ) = work( i ) + abs( ap( k ) )
304 IF( value .LT. sum .OR.
disnan( sum ) ) value = sum
306 ELSE IF( (
lsame( norm,
'F' ) ) .OR. (
lsame( norm,
'E' ) ) )
THEN
310 IF(
lsame( uplo,
'U' ) )
THEN
311 IF(
lsame( diag,
'U' ) )
THEN
316 CALL
dlassq( j-1, ap( k ), 1, scale, sum )
324 CALL
dlassq( j, ap( k ), 1, scale, sum )
329 IF(
lsame( diag,
'U' ) )
THEN
334 CALL
dlassq( n-j, ap( k ), 1, scale, sum )
342 CALL
dlassq( n-j+1, ap( k ), 1, scale, sum )
347 value = scale*sqrt( sum )