69 parameter( zero = 0.0e+0 )
72 INTEGER I, IHI, IHIIN, ILO, ILOIN, INFO, J, KNT, N,
74 REAL ANORM, MEPS, RMAX, SFMIN, TEMP, VMAX
79 REAL DUMMY( 1 ), SCALE( LDA ), SCALIN( LDA )
80 COMPLEX A( LDA, LDA ), AIN( LDA, LDA )
90 INTRINSIC abs, aimag, max, real
96 cabs1( cdum ) = abs( real( cdum ) ) + abs( aimag( cdum ) )
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 =
clange(
'M', n, n, a, lda, dummy )
127 CALL cgebal(
'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 CGEBAL .. ' )
165 WRITE( nout, fmt = 9998 )rmax
166 9998
FORMAT( 1x,
'value of largest test error = ', e12.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 )
real function clange(NORM, M, N, A, LDA, WORK)
CLANGE returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value ...
subroutine cgebal(JOB, N, A, LDA, ILO, IHI, SCALE, INFO)
CGEBAL
real function slamch(CMACH)
SLAMCH