Function **SELECT** is:

LOGICAL FUNCTION SELECT( ALPHAR, ALPHAI, BETA )

USE LA_PRECISION, ONLY: WPwp

REAL(WP), INTENT(IN) :: ALPHAR, ALPHAI, BETA

INTRINSIC EPSILON, ABS

IF ( ABS(BETA) EPSILON(1.0_WP) ) THEN

IF ( ABS(ALPHAI/BETA) 3.0_WP) THEN

SELECT = .TRUE.

ELSE

SELECT = .FALSE.

END IF

ELSE

SELECT = .FALSE.

END IF

END FUNCTION SELECT

The call:

CALL LA_GGES( A, B, ALPHAR, ALPHAI, BETA, VSL, VSR, &

SELECT, SDIM, INFO )

The block upper triangular matrix is:

The upper triangular matrix is:

The left Schur vectors are:

The right Schur vectors are:

The selected eigenvalues are: