124 SUBROUTINE sgbt01( M, N, KL, KU, A, LDA, AFAC, LDAFAC, IPIV, WORK,
132 INTEGER KL, KU, LDA, LDAFAC, M, N
137 REAL A( LDA, * ), AFAC( LDAFAC, * ), WORK( * )
144 parameter( zero = 0.0e+0, one = 1.0e+0 )
147 INTEGER I, I1, I2, IL, IP, IW, J, JL, JU, JUA, KD, LENJ
152 EXTERNAL sasum, slamch
158 INTRINSIC max, min, real
165 IF( m.LE.0 .OR. n.LE.0 )
170 eps = slamch(
'Epsilon' )
174 i1 = max( kd+1-j, 1 )
175 i2 = min( kd+m-j, kl+kd )
177 $ anorm = max( anorm, sasum( i2-i1+1, a( i1, j ), 1 ) )
187 ju = min( kl+ku, j-1 )
189 lenj = min( m, j ) - j + ju + 1
191 CALL scopy( lenj, afac( kd-ju, j ), 1, work, 1 )
192 DO 20 i = lenj + 1, ju + jl + 1
199 DO 30 i = min( m-1, j ), j - ju, -1
204 CALL saxpy( il, t, afac( kd+1, i ), 1, work( iw+1 ),
209 work( iw ) = work( ip )
219 $
CALL saxpy( jua+jl+1, -one, a( ku+1-jua, j ), 1,
220 $ work( ju+1-jua ), 1 )
224 resid = max( resid, sasum( ju+jl+1, work, 1 ) )
230 IF( anorm.LE.zero )
THEN
234 resid = ( ( resid / real( n ) ) / anorm ) / eps
subroutine saxpy(n, sa, sx, incx, sy, incy)
SAXPY
subroutine scopy(n, sx, incx, sy, incy)
SCOPY
subroutine sgbt01(m, n, kl, ku, a, lda, afac, ldafac, ipiv, work, resid)
SGBT01