83 SUBROUTINE zget35( RMAX, LMAX, NINFO, KNT, NIN )
90 INTEGER KNT, LMAX, NIN, NINFO
99 DOUBLE PRECISION ZERO, ONE, TWO
100 parameter( zero = 0.0d0, one = 1.0d0, two = 2.0d0 )
101 DOUBLE PRECISION LARGE
102 parameter( large = 1.0d6 )
104 parameter( cone = 1.0d0 )
107 CHARACTER TRANA, TRANB
108 INTEGER I, IMLA, IMLAD, IMLB, IMLC, INFO, ISGN, ITRANA,
110 DOUBLE PRECISION BIGNUM, EPS, RES, RES1, SCALE, SMLNUM, TNRM,
115 DOUBLE PRECISION DUM( 1 ), VM1( 3 ), VM2( 3 )
116 COMPLEX*16 A( LDT, LDT ), ATMP( LDT, LDT ), B( LDT, LDT ),
117 $ BTMP( LDT, LDT ), C( LDT, LDT ),
118 $ CSAV( LDT, LDT ), CTMP( LDT, LDT )
121 DOUBLE PRECISION DLAMCH, ZLANGE
122 EXTERNAL dlamch, zlange
128 INTRINSIC abs, dble, max, sqrt
135 smlnum = dlamch(
'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 ztrsyl( trana, tranb, isgn, m, n, a,
207 $ ldt, b, ldt, c, ldt, scale,
211 xnrm = zlange(
'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 zgemm( trana,
'N', m, n, m, rmul, a,
220 $ ldt, c, ldt, -scale*rmul, csav,
222 CALL zgemm(
'N', tranb, m, n, n,
223 $ dble( isgn )*rmul, c, ldt, b,
224 $ ldt, cone, csav, ldt )
225 res1 = zlange(
'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 zgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
ZGEMM
subroutine ztrsyl(trana, tranb, isgn, m, n, a, lda, b, ldb, c, ldc, scale, info)
ZTRSYL
subroutine zget35(rmax, lmax, ninfo, knt, nin)
ZGET35