83 SUBROUTINE cget35( RMAX, LMAX, NINFO, KNT, NIN )
90 INTEGER KNT, LMAX, NIN, NINFO
100 parameter( zero = 0.0e0, one = 1.0e0, two = 2.0e0 )
102 parameter( large = 1.0e6 )
104 parameter( cone = 1.0e0 )
107 CHARACTER TRANA, TRANB
108 INTEGER I, IMLA, IMLAD, IMLB, IMLC, INFO, ISGN, ITRANA,
110 REAL BIGNUM, EPS, RES, RES1, SCALE, SMLNUM, TNRM,
115 REAL DUM( 1 ), VM1( 3 ), VM2( 3 )
116 COMPLEX A( LDT, LDT ), ATMP( LDT, LDT ), B( LDT, LDT ),
117 $ BTMP( LDT, LDT ), C( LDT, LDT ),
118 $ CSAV( LDT, LDT ), CTMP( LDT, LDT )
122 EXTERNAL clange, slamch
128 INTRINSIC abs, max, real, sqrt
135 smlnum = slamch(
'S' ) / eps
136 bignum = one / smlnum
140 vm1( 1 ) = sqrt( smlnum )
144 vm2( 2 ) = one + two*eps
155 READ( nin, fmt = * )m, n
159 READ( nin, fmt = * )( atmp( i, j ), j = 1, m )
162 READ( nin, fmt = * )( btmp( i, j ), j = 1, n )
165 READ( nin, fmt = * )( ctmp( i, j ), j = 1, n )
173 DO 110 isgn = -1, 1, 2
185 a( i, j ) = atmp( i, j )*vm1( imla )
186 tnrm = max( tnrm, abs( a( i, j ) ) )
188 a( i, i ) = a( i, i )*vm2( imlad )
189 tnrm = max( tnrm, abs( a( i, i ) ) )
193 b( i, j ) = btmp( i, j )*vm1( imlb )
194 tnrm = max( tnrm, abs( b( i, j ) ) )
201 c( i, j ) = ctmp( i, j )*vm1( imlc )
202 csav( i, j ) = c( i, j )
206 CALL ctrsyl( trana, tranb, isgn, m, n, a,
207 $ ldt, b, ldt, c, ldt, scale,
211 xnrm = clange(
'M', m, n, c, ldt, dum )
213 IF( xnrm.GT.one .AND. tnrm.GT.one )
THEN
214 IF( xnrm.GT.bignum / tnrm )
THEN
215 rmul = max( xnrm, tnrm )
219 CALL cgemm( trana,
'N', m, n, m, rmul, a,
220 $ ldt, c, ldt, -scale*rmul, csav,
222 CALL cgemm(
'N', tranb, m, n, n,
223 $ real( isgn )*rmul, c, ldt, b,
224 $ ldt, cone, csav, ldt )
225 res1 = clange(
'M', m, n, csav, ldt, dum )
226 res = res1 / max( smlnum, smlnum*xnrm,
227 $ ( ( abs( rmul )*tnrm )*eps )*xnrm )
228 IF( res.GT.rmax )
THEN
subroutine cget35(rmax, lmax, ninfo, knt, nin)
CGET35
subroutine cgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
CGEMM
subroutine ctrsyl(trana, tranb, isgn, m, n, a, lda, b, ldb, c, ldc, scale, info)
CTRSYL