146 SUBROUTINE sgeequb( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
155 INTEGER info, lda, m, n
156 REAL amax, colcnd, rowcnd
159 REAL a( lda, * ), c( * ), r( * )
166 parameter( one = 1.0e+0, zero = 0.0e+0 )
170 REAL bignum, rcmax, rcmin, smlnum, radix, logrdx
180 INTRINSIC abs, max, min, log
189 ELSE IF( n.LT.0 )
THEN
191 ELSE IF( lda.LT.max( 1, m ) )
THEN
195 CALL
xerbla(
'SGEEQUB', -info )
201 IF( m.EQ.0 .OR. n.EQ.0 )
THEN
211 bignum = one / smlnum
213 logrdx = log( radix )
225 r( i ) = max( r( i ), abs( a( i, j ) ) )
229 IF( r( i ).GT.zero )
THEN
230 r( i ) = radix**int( log( r( i ) ) / logrdx )
239 rcmax = max( rcmax, r( i ) )
240 rcmin = min( rcmin, r( i ) )
244 IF( rcmin.EQ.zero )
THEN
249 IF( r( i ).EQ.zero )
THEN
259 r( i ) = one / min( max( r( i ), smlnum ), bignum )
264 rowcnd = max( rcmin, smlnum ) / min( rcmax, bignum )
278 c( j ) = max( c( j ), abs( a( i, j ) )*r( i ) )
280 IF( c( j ).GT.zero )
THEN
281 c( j ) = radix**int( log( c( j ) ) / logrdx )
290 rcmin = min( rcmin, c( j ) )
291 rcmax = max( rcmax, c( j ) )
294 IF( rcmin.EQ.zero )
THEN
299 IF( c( j ).EQ.zero )
THEN
309 c( j ) = one / min( max( c( j ), smlnum ), bignum )
314 colcnd = max( rcmin, smlnum ) / min( rcmax, bignum )