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
78 REAL A( LDA, LDA ), AIN( LDA, LDA ), DUMMY( 1 ),
79 $ SCALE( LDA ), SCALIN( LDA )
83 EXTERNAL slamch, slange
100 sfmin = slamch(
'S' )
105 READ( nin, fmt = * )n
109 READ( nin, fmt = * )( a( i, j ), j = 1, n )
112 READ( nin, fmt = * )iloin, ihiin
114 READ( nin, fmt = * )( ain( i, j ), j = 1, n )
116 READ( nin, fmt = * )( scalin( i ), i = 1, n )
118 anorm = slange(
'M', n, n, a, lda, dummy )
121 CALL sgebal(
'B', n, a, lda, ilo, ihi, scale, info )
128 IF( ilo.NE.iloin .OR. ihi.NE.ihiin )
THEN
135 temp = max( a( i, j ), ain( i, j ) )
136 temp = max( temp, sfmin )
137 vmax = max( vmax, abs( a( i, j )-ain( i, j ) ) / temp )
142 temp = max( scale( i ), scalin( i ) )
143 temp = max( temp, sfmin )
144 vmax = max( vmax, abs( scale( i )-scalin( i ) ) / temp )
148 IF( vmax.GT.rmax )
THEN
157 WRITE( nout, fmt = 9999 )
158 9999
FORMAT( 1x,
'.. test output of SGEBAL .. ' )
160 WRITE( nout, fmt = 9998 )rmax
161 9998
FORMAT( 1x,
'value of largest test error = ', e12.3 )
162 WRITE( nout, fmt = 9997 )lmax( 1 )
163 9997
FORMAT( 1x,
'example number where info is not zero = ', i4 )
164 WRITE( nout, fmt = 9996 )lmax( 2 )
165 9996
FORMAT( 1x,
'example number where ILO or IHI wrong = ', i4 )
166 WRITE( nout, fmt = 9995 )lmax( 3 )
167 9995
FORMAT( 1x,
'example number having largest error = ', i4 )
168 WRITE( nout, fmt = 9994 )ninfo
169 9994
FORMAT( 1x,
'number of examples where info is not 0 = ', i4 )
170 WRITE( nout, fmt = 9993 )knt
171 9993
FORMAT( 1x,
'total number of examples tested = ', i4 )
subroutine sgebal(job, n, a, lda, ilo, ihi, scale, info)
SGEBAL
subroutine schkbl(nin, nout)
SCHKBL