68 INTEGER lda, ldb, lwork
69 parameter( lda = 20, ldb = 20, lwork = 6*lda )
71 parameter( zero = 0.0e+0 )
74 INTEGER i, ihi, ihiin, ilo, iloin, info, j, knt, n,
76 REAL anorm, bnorm, eps, rmax, vmax
80 REAL lscale( lda ), lsclin( lda ), rscale( lda ),
81 $ rsclin( lda ), work( lwork )
82 COMPLEX a( lda, lda ), ain( lda, lda ), b( ldb, ldb ),
104 eps =
slamch(
'Precision' )
108 READ( nin, fmt = * )n
112 READ( nin, fmt = * )( a( i, j ), j = 1, n )
116 READ( nin, fmt = * )( b( i, j ), j = 1, n )
119 READ( nin, fmt = * )iloin, ihiin
121 READ( nin, fmt = * )( ain( i, j ), j = 1, n )
124 READ( nin, fmt = * )( bin( i, j ), j = 1, n )
127 READ( nin, fmt = * )( lsclin( i ), i = 1, n )
128 READ( nin, fmt = * )( rsclin( i ), i = 1, n )
130 anorm =
clange(
'M', n, n, a, lda, work )
131 bnorm =
clange(
'M', n, n, b, ldb, work )
135 CALL
cggbal(
'B', n, a, lda, b, ldb, ilo, ihi, lscale, rscale,
143 IF( ilo.NE.iloin .OR. ihi.NE.ihiin )
THEN
151 vmax = max( vmax, abs( a( i, j )-ain( i, j ) ) )
152 vmax = max( vmax, abs( b( i, j )-bin( i, j ) ) )
157 vmax = max( vmax, abs( lscale( i )-lsclin( i ) ) )
158 vmax = max( vmax, abs( rscale( i )-rsclin( i ) ) )
161 vmax = vmax / ( eps*max( anorm, bnorm ) )
163 IF( vmax.GT.rmax )
THEN
172 WRITE( nout, fmt = 9999 )
173 9999 format(
' .. test output of CGGBAL .. ' )
175 WRITE( nout, fmt = 9998 )rmax
176 9998 format(
' ratio of largest test error = ', e12.3 )
177 WRITE( nout, fmt = 9997 )lmax( 1 )
178 9997 format(
' example number where info is not zero = ', i4 )
179 WRITE( nout, fmt = 9996 )lmax( 2 )
180 9996 format(
' example number where ILO or IHI is wrong = ', i4 )
181 WRITE( nout, fmt = 9995 )lmax( 3 )
182 9995 format(
' example number having largest error = ', i4 )
183 WRITE( nout, fmt = 9994 )ninfo
184 9994 format(
' number of examples where info is not 0 = ', i4 )
185 WRITE( nout, fmt = 9993 )knt
186 9993 format(
' total number of examples tested = ', i4 )