54 SUBROUTINE zchkgl( NIN, NOUT )
68 INTEGER LDA, LDB, LWORK
69 parameter ( lda = 20, ldb = 20, lwork = 6*lda )
71 parameter ( zero = 0.0d+0 )
74 INTEGER I, IHI, IHIIN, ILO, ILOIN, INFO, J, KNT, N,
76 DOUBLE PRECISION ANORM, BNORM, EPS, RMAX, VMAX
80 DOUBLE PRECISION LSCALE( lda ), LSCLIN( lda ), RSCALE( lda ),
81 $ rsclin( lda ), work( lwork )
82 COMPLEX*16 A( lda, lda ), AIN( lda, lda ), B( ldb, ldb ),
86 DOUBLE PRECISION DLAMCH, ZLANGE
87 EXTERNAL dlamch, zlange
104 eps = dlamch(
'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 = zlange(
'M', n, n, a, lda, work )
131 bnorm = zlange(
'M', n, n, b, ldb, work )
135 CALL zggbal(
'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 ZGGBAL .. ' )
175 WRITE( nout, fmt = 9998 )rmax
176 9998
FORMAT(
' ratio of largest test error = ', d12.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 )
subroutine zggbal(JOB, N, A, LDA, B, LDB, ILO, IHI, LSCALE, RSCALE, WORK, INFO)
ZGGBAL
subroutine zchkgl(NIN, NOUT)
ZCHKGL