114 SUBROUTINE sdisna( JOB, M, N, D, SEP, INFO )
125 REAL D( * ), SEP( * )
132 parameter( zero = 0.0e+0 )
135 LOGICAL DECR, EIGEN, INCR, LEFT, RIGHT, SING
137 REAL ANORM, EPS, NEWGAP, OLDGAP, SAFMIN, THRESH
142 EXTERNAL lsame, slamch
145 INTRINSIC abs, max, min
155 eigen = lsame( job,
'E' )
156 left = lsame( job,
'L' )
157 right = lsame( job,
'R' )
158 sing = left .OR. right
164 IF( .NOT.eigen .AND. .NOT.sing )
THEN
166 ELSE IF( m.LT.0 )
THEN
168 ELSE IF( k.LT.0 )
THEN
175 $ incr = incr .AND. d( i ).LE.d( i+1 )
177 $ decr = decr .AND. d( i ).GE.d( i+1 )
179 IF( sing .AND. k.GT.0 )
THEN
181 $ incr = incr .AND. zero.LE.d( 1 )
183 $ decr = decr .AND. d( k ).GE.zero
185 IF( .NOT.( incr .OR. decr ) )
189 CALL xerbla(
'SDISNA', -info )
201 sep( 1 ) = slamch(
'O' )
203 oldgap = abs( d( 2 )-d( 1 ) )
206 newgap = abs( d( i+1 )-d( i ) )
207 sep( i ) = min( oldgap, newgap )
213 IF( ( left .AND. m.GT.n ) .OR. ( right .AND. m.LT.n ) )
THEN
215 $ sep( 1 ) = min( sep( 1 ), d( 1 ) )
217 $ sep( k ) = min( sep( k ), d( k ) )
225 safmin = slamch(
'S' )
226 anorm = max( abs( d( 1 ) ), abs( d( k ) ) )
227 IF( anorm.EQ.zero )
THEN
230 thresh = max( eps*anorm, safmin )
233 sep( i ) = max( sep( i ), thresh )