61 DOUBLE PRECISION THRESH
67 DOUBLE PRECISION ZERO, ONE, TEN
68 parameter( zero = 0.0d0, one = 1.0d+0, ten = 1.0d1 )
70 parameter( czero = ( 0.0d0, 0.0d0 ) )
72 parameter( cone = ( 1.0d0, 0.0d0 ) )
74 parameter( nsz = 5, nszb = 3*nsz-2 )
76 parameter( nszp = ( nsz*( nsz+1 ) ) / 2,
82 INTEGER I, INFO, J, KL, KU, M, N
83 DOUBLE PRECISION CCOND, EPS, NORM, RATIO, RCMAX, RCMIN, RCOND
86 DOUBLE PRECISION C( NSZ ), POW( NPOW ), R( NSZ ), RESLTS( 5 ),
88 COMPLEX*16 A( NSZ, NSZ ), AB( NSZB, NSZ ), AP( NSZP )
91 DOUBLE PRECISION DLAMCH
98 INTRINSIC abs, max, min
102 path( 1: 1 ) =
'Zomplex precision'
110 pow( i ) = ten**( i-1 )
111 rpow( i ) = one / pow( i )
121 IF( i.LE.m .AND. j.LE.n )
THEN
122 a( i, j ) = pow( i+j+1 )*( -1 )**( i+j )
129 CALL zgeequ( m, n, a, nsz, r, c, rcond, ccond, norm, info )
134 IF( n.NE.0 .AND. m.NE.0 )
THEN
135 reslts( 1 ) = max( reslts( 1 ),
136 $ abs( ( rcond-rpow( m ) ) / rpow( m ) ) )
137 reslts( 1 ) = max( reslts( 1 ),
138 $ abs( ( ccond-rpow( n ) ) / rpow( n ) ) )
139 reslts( 1 ) = max( reslts( 1 ),
140 $ abs( ( norm-pow( n+m+1 ) ) / pow( n+m+
143 reslts( 1 ) = max( reslts( 1 ),
144 $ abs( ( r( i )-rpow( i+n+1 ) ) /
148 reslts( 1 ) = max( reslts( 1 ),
149 $ abs( ( c( j )-pow( n-j+1 ) ) /
161 a( max( nsz-1, 1 ), j ) = czero
163 CALL zgeequ( nsz, nsz, a, nsz, r, c, rcond, ccond, norm, info )
164 IF( info.NE.max( nsz-1, 1 ) )
168 a( max( nsz-1, 1 ), j ) = cone
171 a( i, max( nsz-1, 1 ) ) = czero
173 CALL zgeequ( nsz, nsz, a, nsz, r, c, rcond, ccond, norm, info )
174 IF( info.NE.nsz+max( nsz-1, 1 ) )
176 reslts( 1 ) = reslts( 1 ) / eps
182 DO 230 kl = 0, max( m-1, 0 )
183 DO 220 ku = 0, max( n-1, 0 )
192 IF( i.LE.min( m, j+kl ) .AND. i.GE.
193 $ max( 1, j-ku ) .AND. j.LE.n )
THEN
194 ab( ku+1+i-j, j ) = pow( i+j+1 )*
200 CALL zgbequ( m, n, kl, ku, ab, nszb, r, c, rcond,
201 $ ccond, norm, info )
204 IF( .NOT.( ( n+kl.LT.m .AND. info.EQ.n+kl+1 ) .OR.
205 $ ( m+ku.LT.n .AND. info.EQ.2*m+ku+1 ) ) )
THEN
209 IF( n.NE.0 .AND. m.NE.0 )
THEN
214 rcmin = min( rcmin, r( i ) )
215 rcmax = max( rcmax, r( i ) )
217 ratio = rcmin / rcmax
218 reslts( 2 ) = max( reslts( 2 ),
219 $ abs( ( rcond-ratio ) / ratio ) )
224 rcmin = min( rcmin, c( j ) )
225 rcmax = max( rcmax, c( j ) )
227 ratio = rcmin / rcmax
228 reslts( 2 ) = max( reslts( 2 ),
229 $ abs( ( ccond-ratio ) / ratio ) )
231 reslts( 2 ) = max( reslts( 2 ),
232 $ abs( ( norm-pow( n+m+1 ) ) /
237 IF( i.LE.j+kl .AND. i.GE.j-ku )
THEN
238 ratio = abs( r( i )*pow( i+j+1 )*
240 rcmax = max( rcmax, ratio )
243 reslts( 2 ) = max( reslts( 2 ),
250 IF( i.LE.j+kl .AND. i.GE.j-ku )
THEN
251 ratio = abs( r( i )*pow( i+j+1 )*
253 rcmax = max( rcmax, ratio )
256 reslts( 2 ) = max( reslts( 2 ),
266 reslts( 2 ) = reslts( 2 ) / eps
274 IF( i.LE.n .AND. j.EQ.i )
THEN
275 a( i, j ) = pow( i+j+1 )*( -1 )**( i+j )
282 CALL zpoequ( n, a, nsz, r, rcond, norm, info )
288 reslts( 3 ) = max( reslts( 3 ),
289 $ abs( ( rcond-rpow( n ) ) / rpow( n ) ) )
290 reslts( 3 ) = max( reslts( 3 ),
291 $ abs( ( norm-pow( 2*n+1 ) ) / pow( 2*n+
294 reslts( 3 ) = max( reslts( 3 ),
295 $ abs( ( r( i )-rpow( i+1 ) ) / rpow( i+
301 a( max( nsz-1, 1 ), max( nsz-1, 1 ) ) = -cone
302 CALL zpoequ( nsz, a, nsz, r, rcond, norm, info )
303 IF( info.NE.max( nsz-1, 1 ) )
305 reslts( 3 ) = reslts( 3 ) / eps
313 DO 300 i = 1, ( n*( n+1 ) ) / 2
317 ap( ( i*( i+1 ) ) / 2 ) = pow( 2*i+1 )
320 CALL zppequ(
'U', n, ap, r, rcond, norm, info )
326 reslts( 4 ) = max( reslts( 4 ),
327 $ abs( ( rcond-rpow( n ) ) / rpow( n ) ) )
328 reslts( 4 ) = max( reslts( 4 ),
329 $ abs( ( norm-pow( 2*n+1 ) ) / pow( 2*n+
332 reslts( 4 ) = max( reslts( 4 ),
333 $ abs( ( r( i )-rpow( i+1 ) ) / rpow( i+
341 DO 330 i = 1, ( n*( n+1 ) ) / 2
346 ap( j ) = pow( 2*i+1 )
350 CALL zppequ(
'L', n, ap, r, rcond, norm, info )
356 reslts( 4 ) = max( reslts( 4 ),
357 $ abs( ( rcond-rpow( n ) ) / rpow( n ) ) )
358 reslts( 4 ) = max( reslts( 4 ),
359 $ abs( ( norm-pow( 2*n+1 ) ) / pow( 2*n+
362 reslts( 4 ) = max( reslts( 4 ),
363 $ abs( ( r( i )-rpow( i+1 ) ) / rpow( i+
370 i = ( nsz*( nsz+1 ) ) / 2 - 2
372 CALL zppequ(
'L', nsz, ap, r, rcond, norm, info )
373 IF( info.NE.max( nsz-1, 1 ) )
375 reslts( 4 ) = reslts( 4 ) / eps
380 DO 450 kl = 0, max( n-1, 0 )
390 ab( kl+1, j ) = pow( 2*j+1 )
393 CALL zpbequ(
'U', n, kl, ab, nszb, r, rcond, norm, info )
399 reslts( 5 ) = max( reslts( 5 ),
400 $ abs( ( rcond-rpow( n ) ) / rpow( n ) ) )
401 reslts( 5 ) = max( reslts( 5 ),
402 $ abs( ( norm-pow( 2*n+1 ) ) / pow( 2*n+
405 reslts( 5 ) = max( reslts( 5 ),
406 $ abs( ( r( i )-rpow( i+1 ) ) /
412 ab( kl+1, max( n-1, 1 ) ) = -cone
413 CALL zpbequ(
'U', n, kl, ab, nszb, r, rcond, norm, info )
414 IF( info.NE.max( n-1, 1 ) )
426 ab( 1, j ) = pow( 2*j+1 )
429 CALL zpbequ(
'L', n, kl, ab, nszb, r, rcond, norm, info )
435 reslts( 5 ) = max( reslts( 5 ),
436 $ abs( ( rcond-rpow( n ) ) / rpow( n ) ) )
437 reslts( 5 ) = max( reslts( 5 ),
438 $ abs( ( norm-pow( 2*n+1 ) ) / pow( 2*n+
441 reslts( 5 ) = max( reslts( 5 ),
442 $ abs( ( r( i )-rpow( i+1 ) ) /
448 ab( 1, max( n-1, 1 ) ) = -cone
449 CALL zpbequ(
'L', n, kl, ab, nszb, r, rcond, norm, info )
450 IF( info.NE.max( n-1, 1 ) )
455 reslts( 5 ) = reslts( 5 ) / eps
456 ok = ( reslts( 1 ).LE.thresh ) .AND.
457 $ ( reslts( 2 ).LE.thresh ) .AND.
458 $ ( reslts( 3 ).LE.thresh ) .AND.
459 $ ( reslts( 4 ).LE.thresh ) .AND. ( reslts( 5 ).LE.thresh )
460 WRITE( nout, fmt = * )
462 WRITE( nout, fmt = 9999 )path
464 IF( reslts( 1 ).GT.thresh )
465 $
WRITE( nout, fmt = 9998 )reslts( 1 ), thresh
466 IF( reslts( 2 ).GT.thresh )
467 $
WRITE( nout, fmt = 9997 )reslts( 2 ), thresh
468 IF( reslts( 3 ).GT.thresh )
469 $
WRITE( nout, fmt = 9996 )reslts( 3 ), thresh
470 IF( reslts( 4 ).GT.thresh )
471 $
WRITE( nout, fmt = 9995 )reslts( 4 ), thresh
472 IF( reslts( 5 ).GT.thresh )
473 $
WRITE( nout, fmt = 9994 )reslts( 5 ), thresh
475 9999
FORMAT( 1x,
'All tests for ', a3,
476 $
' routines passed the threshold' )
477 9998
FORMAT(
' ZGEEQU failed test with value ', d10.3,
' exceeding',
478 $
' threshold ', d10.3 )
479 9997
FORMAT(
' ZGBEQU failed test with value ', d10.3,
' exceeding',
480 $
' threshold ', d10.3 )
481 9996
FORMAT(
' ZPOEQU failed test with value ', d10.3,
' exceeding',
482 $
' threshold ', d10.3 )
483 9995
FORMAT(
' ZPPEQU failed test with value ', d10.3,
' exceeding',
484 $
' threshold ', d10.3 )
485 9994
FORMAT(
' ZPBEQU failed test with value ', d10.3,
' exceeding',
486 $
' threshold ', d10.3 )
subroutine zgbequ(m, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd, amax, info)
ZGBEQU
subroutine zgeequ(m, n, a, lda, r, c, rowcnd, colcnd, amax, info)
ZGEEQU
subroutine zpbequ(uplo, n, kd, ab, ldab, s, scond, amax, info)
ZPBEQU
subroutine zpoequ(n, a, lda, s, scond, amax, info)
ZPOEQU
subroutine zppequ(uplo, n, ap, s, scond, amax, info)
ZPPEQU
subroutine zchkeq(thresh, nout)
ZCHKEQ