69 parameter( zero = 0.0d+0 )
72 INTEGER I, IHI, IHIIN, ILO, ILOIN, INFO, J, KNT, N,
74 DOUBLE PRECISION ANORM, MEPS, RMAX, SFMIN, TEMP, VMAX
79 DOUBLE PRECISION DUMMY( 1 ), SCALE( LDA ), SCALIN( LDA )
80 COMPLEX*16 A( LDA, LDA ), AIN( LDA, LDA )
83 DOUBLE PRECISION DLAMCH, ZLANGE
84 EXTERNAL dlamch, zlange
90 INTRINSIC abs, dble, dimag, max
93 DOUBLE PRECISION CABS1
96 cabs1( cdum ) = abs( dble( cdum ) ) + abs( dimag( cdum ) )
107 sfmin = dlamch(
'S' )
112 READ( nin, fmt = * )n
116 READ( nin, fmt = * )( a( i, j ), j = 1, n )
119 READ( nin, fmt = * )iloin, ihiin
121 READ( nin, fmt = * )( ain( i, j ), j = 1, n )
123 READ( nin, fmt = * )( scalin( i ), i = 1, n )
125 anorm = zlange(
'M', n, n, a, lda, dummy )
127 CALL zgebal(
'B', n, a, lda, ilo, ihi, scale, info )
134 IF( ilo.NE.iloin .OR. ihi.NE.ihiin )
THEN
141 temp = max( cabs1( a( i, j ) ), cabs1( ain( i, j ) ) )
142 temp = max( temp, sfmin )
143 vmax = max( vmax, cabs1( a( i, j )-ain( i, j ) ) / temp )
148 temp = max( scale( i ), scalin( i ) )
149 temp = max( temp, sfmin )
150 vmax = max( vmax, abs( scale( i )-scalin( i ) ) / temp )
153 IF( vmax.GT.rmax )
THEN
162 WRITE( nout, fmt = 9999 )
163 9999
FORMAT( 1x,
'.. test output of ZGEBAL .. ' )
165 WRITE( nout, fmt = 9998 )rmax
166 9998
FORMAT( 1x,
'value of largest test error = ', d12.3 )
167 WRITE( nout, fmt = 9997 )lmax( 1 )
168 9997
FORMAT( 1x,
'example number where info is not zero = ', i4 )
169 WRITE( nout, fmt = 9996 )lmax( 2 )
170 9996
FORMAT( 1x,
'example number where ILO or IHI wrong = ', i4 )
171 WRITE( nout, fmt = 9995 )lmax( 3 )
172 9995
FORMAT( 1x,
'example number having largest error = ', i4 )
173 WRITE( nout, fmt = 9994 )ninfo
174 9994
FORMAT( 1x,
'number of examples where info is not 0 = ', i4 )
175 WRITE( nout, fmt = 9993 )knt
176 9993
FORMAT( 1x,
'total number of examples tested = ', i4 )
subroutine zgebal(job, n, a, lda, ilo, ihi, scale, info)
ZGEBAL
subroutine zchkbl(nin, nout)
ZCHKBL