116 SUBROUTINE sdisna( JOB, M, N, D, SEP, INFO )
127 REAL D( * ), SEP( * )
134 parameter( zero = 0.0e+0 )
137 LOGICAL DECR, EIGEN, INCR, LEFT, RIGHT, SING
139 REAL ANORM, EPS, NEWGAP, OLDGAP, SAFMIN, THRESH
144 EXTERNAL lsame, slamch
147 INTRINSIC abs, max, min
157 eigen = lsame( job,
'E' )
158 left = lsame( job,
'L' )
159 right = lsame( job,
'R' )
160 sing = left .OR. right
166 IF( .NOT.eigen .AND. .NOT.sing )
THEN
168 ELSE IF( m.LT.0 )
THEN
170 ELSE IF( k.LT.0 )
THEN
177 $ incr = incr .AND. d( i ).LE.d( i+1 )
179 $ decr = decr .AND. d( i ).GE.d( i+1 )
181 IF( sing .AND. k.GT.0 )
THEN
183 $ incr = incr .AND. zero.LE.d( 1 )
185 $ decr = decr .AND. d( k ).GE.zero
187 IF( .NOT.( incr .OR. decr ) )
191 CALL xerbla(
'SDISNA', -info )
203 sep( 1 ) = slamch(
'O' )
205 oldgap = abs( d( 2 )-d( 1 ) )
208 newgap = abs( d( i+1 )-d( i ) )
209 sep( i ) = min( oldgap, newgap )
215 IF( ( left .AND. m.GT.n ) .OR. ( right .AND. m.LT.n ) )
THEN
217 $ sep( 1 ) = min( sep( 1 ), d( 1 ) )
219 $ sep( k ) = min( sep( k ), d( k ) )
227 safmin = slamch(
'S' )
228 anorm = max( abs( d( 1 ) ), abs( d( k ) ) )
229 IF( anorm.EQ.zero )
THEN
232 thresh = max( eps*anorm, safmin )
235 sep( i ) = max( sep( i ), thresh )
subroutine xerbla(srname, info)
subroutine sdisna(job, m, n, d, sep, info)
SDISNA