102 SUBROUTINE sget39( RMAX, LMAX, NINFO, KNT )
109 INTEGER KNT, LMAX, NINFO
117 parameter( ldt = 10, ldt2 = 2*ldt )
119 parameter( zero = 0.0, one = 1.0 )
122 INTEGER I, INFO, IVM1, IVM2, IVM3, IVM4, IVM5, J, K, N,
124 REAL BIGNUM, DOMIN, DUMM, EPS, NORM, NORMTB, RESID,
125 $ SCALE, SMLNUM, W, XNORM
129 REAL SASUM, SDOT, SLAMCH, SLANGE
130 EXTERNAL isamax, sasum, sdot, slamch, slange
136 INTRINSIC abs, cos, max, real, sin, sqrt
139 INTEGER IDIM( 6 ), IVAL( 5, 5, 6 )
140 REAL B( LDT ), D( LDT2 ), DUM( 1 ), T( LDT, LDT ),
141 $ VM1( 5 ), VM2( 5 ), VM3( 5 ), VM4( 5 ),
142 $ VM5( 3 ), WORK( LDT ), X( LDT2 ), Y( LDT2 )
146 DATA ival / 3, 4*0, 1, 1, -1, 0, 0, 3, 2, 1, 0, 0,
147 $ 4, 3, 2, 2, 0, 5*0, 1, 4*0, 2, 2, 3*0, 3, 3, 4,
148 $ 0, 0, 4, 2, 2, 3, 0, 4*1, 5, 1, 4*0, 2, 4, -2,
149 $ 0, 0, 3, 3, 4, 0, 0, 4, 2, 2, 3, 0, 5*1, 1,
150 $ 4*0, 2, 1, -1, 0, 0, 9, 8, 1, 0, 0, 4, 9, 1, 2,
151 $ -1, 5*2, 9, 4*0, 6, 4, 0, 0, 0, 3, 2, 1, 1, 0,
152 $ 5, 1, -1, 1, 0, 5*2, 4, 4*0, 2, 2, 0, 0, 0, 1,
153 $ 4, 4, 0, 0, 2, 4, 2, 2, -1, 5*2 /
160 smlnum = slamch(
'S' )
161 bignum = one / smlnum
166 vm1( 2 ) = sqrt( smlnum )
167 vm1( 3 ) = sqrt( vm1( 2 ) )
168 vm1( 4 ) = sqrt( bignum )
169 vm1( 5 ) = sqrt( vm1( 4 ) )
172 vm2( 2 ) = sqrt( smlnum )
173 vm2( 3 ) = sqrt( vm2( 2 ) )
174 vm2( 4 ) = sqrt( bignum )
175 vm2( 5 ) = sqrt( vm2( 4 ) )
178 vm3( 2 ) = sqrt( smlnum )
179 vm3( 3 ) = sqrt( vm3( 2 ) )
180 vm3( 4 ) = sqrt( bignum )
181 vm3( 5 ) = sqrt( vm3( 4 ) )
184 vm4( 2 ) = sqrt( smlnum )
185 vm4( 3 ) = sqrt( vm4( 2 ) )
186 vm4( 4 ) = sqrt( bignum )
187 vm4( 5 ) = sqrt( vm4( 4 ) )
191 vm5( 3 ) = sqrt( smlnum )
198 smlnum = smlnum / eps
212 t( i, j ) = real( ival( i, j, ndim ) )*
215 $ t( i, j ) = t( i, j )*vm5( ivm5 )
222 b( i ) = cos( real( i ) )*vm3( ivm3 )
226 d( i ) = sin( real( i ) )*vm4( ivm4 )
229 norm = slange(
'1', n, n, t, ldt, work )
230 k = isamax( n, b, 1 )
231 normtb = norm + abs( b( k ) ) + abs( w )
233 CALL scopy( n, d, 1, x, 1 )
235 CALL slaqtr( .false., .true., n, t, ldt, dum,
236 $ dumm, scale, x, work, info )
243 CALL scopy( n, d, 1, y, 1 )
244 CALL sgemv(
'No transpose', n, n, one, t, ldt,
245 $ x, 1, -scale, y, 1 )
246 xnorm = sasum( n, x, 1 )
247 resid = sasum( n, y, 1 )
248 domin = max( smlnum, ( smlnum / eps )*norm,
249 $ ( norm*eps )*xnorm )
250 resid = resid / domin
251 IF( resid.GT.rmax )
THEN
256 CALL scopy( n, d, 1, x, 1 )
258 CALL slaqtr( .true., .true., n, t, ldt, dum,
259 $ dumm, scale, x, work, info )
266 CALL scopy( n, d, 1, y, 1 )
267 CALL sgemv(
'Transpose', n, n, one, t, ldt, x,
269 xnorm = sasum( n, x, 1 )
270 resid = sasum( n, y, 1 )
271 domin = max( smlnum, ( smlnum / eps )*norm,
272 $ ( norm*eps )*xnorm )
273 resid = resid / domin
274 IF( resid.GT.rmax )
THEN
279 CALL scopy( 2*n, d, 1, x, 1 )
281 CALL slaqtr( .false., .false., n, t, ldt, b, w,
282 $ scale, x, work, info )
291 CALL scopy( 2*n, d, 1, y, 1 )
292 y( 1 ) = sdot( n, b, 1, x( 1+n ), 1 ) +
295 y( i ) = w*x( i+n ) + scale*y( i )
297 CALL sgemv(
'No transpose', n, n, one, t, ldt,
300 y( 1+n ) = sdot( n, b, 1, x, 1 ) -
303 y( i+n ) = w*x( i ) - scale*y( i+n )
305 CALL sgemv(
'No transpose', n, n, one, t, ldt,
306 $ x( 1+n ), 1, one, y( 1+n ), 1 )
308 resid = sasum( 2*n, y, 1 )
309 domin = max( smlnum, ( smlnum / eps )*normtb,
310 $ eps*( normtb*sasum( 2*n, x, 1 ) ) )
311 resid = resid / domin
312 IF( resid.GT.rmax )
THEN
317 CALL scopy( 2*n, d, 1, x, 1 )
319 CALL slaqtr( .true., .false., n, t, ldt, b, w,
320 $ scale, x, work, info )
328 CALL scopy( 2*n, d, 1, y, 1 )
329 y( 1 ) = b( 1 )*x( 1+n ) - scale*y( 1 )
331 y( i ) = b( i )*x( 1+n ) + w*x( i+n ) -
334 CALL sgemv(
'Transpose', n, n, one, t, ldt, x,
337 y( 1+n ) = b( 1 )*x( 1 ) + scale*y( 1+n )
339 y( i+n ) = b( i )*x( 1 ) + w*x( i ) +
342 CALL sgemv(
'Transpose', n, n, one, t, ldt,
343 $ x( 1+n ), 1, -one, y( 1+n ), 1 )
345 resid = sasum( 2*n, y, 1 )
346 domin = max( smlnum, ( smlnum / eps )*normtb,
347 $ eps*( normtb*sasum( 2*n, x, 1 ) ) )
348 resid = resid / domin
349 IF( resid.GT.rmax )
THEN
subroutine scopy(n, sx, incx, sy, incy)
SCOPY
subroutine sgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
SGEMV
subroutine slaqtr(ltran, lreal, n, t, ldt, b, w, scale, x, work, info)
SLAQTR solves a real quasi-triangular system of equations, or a complex quasi-triangular system of sp...
subroutine sget39(rmax, lmax, ninfo, knt)
SGET39