Skip to content

Commit

Permalink
Use normwise criterion for inf eigenvalues in QZ
Browse files Browse the repository at this point in the history
  • Loading branch information
thijssteel committed Aug 8, 2022
1 parent 3381a0e commit c699406
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 28 deletions.
9 changes: 2 additions & 7 deletions SRC/chgeqz.f
Original file line number Diff line number Diff line change
Expand Up @@ -523,9 +523,7 @@ SUBROUTINE CHGEQZ( JOB, COMPQ, COMPZ, N, ILO, IHI, H, LDH, T, LDT,
END IF
END IF
*
IF( ABS( T( ILAST, ILAST ) ).LE.MAX( SAFMIN, ULP*(
$ ABS( T( ILAST - 1, ILAST ) ) + ABS( T( ILAST-1, ILAST-1 )
$ ) ) ) ) THEN
IF( ABS( T( ILAST, ILAST ) ).LE.BTOL ) THEN
T( ILAST, ILAST ) = CZERO
GO TO 50
END IF
Expand All @@ -551,10 +549,7 @@ SUBROUTINE CHGEQZ( JOB, COMPQ, COMPZ, N, ILO, IHI, H, LDH, T, LDT,
*
* Test 2: for T(j,j)=0
*
TEMP = ABS ( T( J, J + 1 ) )
IF ( J .GT. ILO )
$ TEMP = TEMP + ABS ( T( J - 1, J ) )
IF( ABS( T( J, J ) ).LT.MAX( SAFMIN,ULP*TEMP ) ) THEN
IF( ABS( T( J, J ) ).LT.BTOL ) THEN
T( J, J ) = CZERO
*
* Test 1a: Check for 2 consecutive small subdiagonals in A
Expand Down
9 changes: 2 additions & 7 deletions SRC/dhgeqz.f
Original file line number Diff line number Diff line change
Expand Up @@ -536,9 +536,7 @@ SUBROUTINE DHGEQZ( JOB, COMPQ, COMPZ, N, ILO, IHI, H, LDH, T, LDT,
END IF
END IF
*
IF( ABS( T( ILAST, ILAST ) ).LE.MAX( SAFMIN, ULP*(
$ ABS( T( ILAST - 1, ILAST ) ) + ABS( T( ILAST-1, ILAST-1 )
$ ) ) ) ) THEN
IF( ABS( T( ILAST, ILAST ) ).LE.BTOL ) THEN
T( ILAST, ILAST ) = ZERO
GO TO 70
END IF
Expand All @@ -564,10 +562,7 @@ SUBROUTINE DHGEQZ( JOB, COMPQ, COMPZ, N, ILO, IHI, H, LDH, T, LDT,
*
* Test 2: for T(j,j)=0
*
TEMP = ABS ( T( J, J + 1 ) )
IF ( J .GT. ILO )
$ TEMP = TEMP + ABS ( T( J - 1, J ) )
IF( ABS( T( J, J ) ).LT.MAX( SAFMIN,ULP*TEMP ) ) THEN
IF( ABS( T( J, J ) ).LT.BTOL ) THEN
T( J, J ) = ZERO
*
* Test 1a: Check for 2 consecutive small subdiagonals in A
Expand Down
9 changes: 2 additions & 7 deletions SRC/shgeqz.f
Original file line number Diff line number Diff line change
Expand Up @@ -536,9 +536,7 @@ SUBROUTINE SHGEQZ( JOB, COMPQ, COMPZ, N, ILO, IHI, H, LDH, T, LDT,
END IF
END IF
*
IF( ABS( T( ILAST, ILAST ) ).LE.MAX( SAFMIN, ULP*(
$ ABS( T( ILAST - 1, ILAST ) ) + ABS( T( ILAST-1, ILAST-1 )
$ ) ) ) ) THEN
IF( ABS( T( ILAST, ILAST ) ).LE.BTOL ) THEN
T( ILAST, ILAST ) = ZERO
GO TO 70
END IF
Expand All @@ -564,10 +562,7 @@ SUBROUTINE SHGEQZ( JOB, COMPQ, COMPZ, N, ILO, IHI, H, LDH, T, LDT,
*
* Test 2: for T(j,j)=0
*
TEMP = ABS ( T( J, J + 1 ) )
IF ( J .GT. ILO )
$ TEMP = TEMP + ABS ( T( J - 1, J ) )
IF( ABS( T( J, J ) ).LT.MAX( SAFMIN,ULP*TEMP ) ) THEN
IF( ABS( T( J, J ) ).LT.BTOL ) THEN
T( J, J ) = ZERO
*
* Test 1a: Check for 2 consecutive small subdiagonals in A
Expand Down
9 changes: 2 additions & 7 deletions SRC/zhgeqz.f
Original file line number Diff line number Diff line change
Expand Up @@ -524,9 +524,7 @@ SUBROUTINE ZHGEQZ( JOB, COMPQ, COMPZ, N, ILO, IHI, H, LDH, T, LDT,
END IF
END IF
*
IF( ABS( T( ILAST, ILAST ) ).LE.MAX( SAFMIN, ULP*(
$ ABS( T( ILAST - 1, ILAST ) ) + ABS( T( ILAST-1, ILAST-1 )
$ ) ) ) ) THEN
IF( ABS( T( ILAST, ILAST ) ).LE.BTOL ) THEN
T( ILAST, ILAST ) = CZERO
GO TO 50
END IF
Expand All @@ -552,10 +550,7 @@ SUBROUTINE ZHGEQZ( JOB, COMPQ, COMPZ, N, ILO, IHI, H, LDH, T, LDT,
*
* Test 2: for T(j,j)=0
*
TEMP = ABS ( T( J, J + 1 ) )
IF ( J .GT. ILO )
$ TEMP = TEMP + ABS ( T( J - 1, J ) )
IF( ABS( T( J, J ) ).LT.MAX( SAFMIN,ULP*TEMP ) ) THEN
IF( ABS( T( J, J ) ).LT.BTOL ) THEN
T( J, J ) = CZERO
*
* Test 1a: Check for 2 consecutive small subdiagonals in A
Expand Down

0 comments on commit c699406

Please sign in to comment.