--- rpl/lapack/lapack/dhgeqz.f 2014/01/27 09:28:18 1.15 +++ rpl/lapack/lapack/dhgeqz.f 2023/08/07 08:38:52 1.21 @@ -2,18 +2,18 @@ * * =========== DOCUMENTATION =========== * -* Online html documentation available at -* http://www.netlib.org/lapack/explore-html/ +* Online html documentation available at +* http://www.netlib.org/lapack/explore-html/ * *> \htmlonly -*> Download DHGEQZ + dependencies -*> -*> [TGZ] -*> -*> [ZIP] -*> +*> Download DHGEQZ + dependencies +*> +*> [TGZ] +*> +*> [ZIP] +*> *> [TXT] -*> \endhtmlonly +*> \endhtmlonly * * Definition: * =========== @@ -21,7 +21,7 @@ * SUBROUTINE DHGEQZ( JOB, COMPQ, COMPZ, N, ILO, IHI, H, LDH, T, LDT, * ALPHAR, ALPHAI, BETA, Q, LDQ, Z, LDZ, WORK, * LWORK, INFO ) -* +* * .. Scalar Arguments .. * CHARACTER COMPQ, COMPZ, JOB * INTEGER IHI, ILO, INFO, LDH, LDQ, LDT, LDZ, LWORK, N @@ -31,7 +31,7 @@ * $ H( LDH, * ), Q( LDQ, * ), T( LDT, * ), * $ WORK( * ), Z( LDZ, * ) * .. -* +* * *> \par Purpose: * ============= @@ -50,9 +50,9 @@ *> *> If JOB='S', then the Hessenberg-triangular pair (H,T) is *> also reduced to generalized Schur form, -*> +*> *> H = Q*S*Z**T, T = Q*P*Z**T, -*> +*> *> where Q and Z are orthogonal matrices, P is an upper triangular *> matrix, and S is a quasi-triangular matrix with 1-by-1 and 2-by-2 *> diagonal blocks. @@ -75,7 +75,7 @@ *> generalized Schur factorization of (A,B): *> *> A = (Q1*Q)*S*(Z1*Z)**T, B = (Q1*Q)*P*(Z1*Z)**T. -*> +*> *> To avoid overflow, eigenvalues of the matrix pair (H,T) (equivalently, *> of (A,B)) are computed as a pair of values (alpha,beta), where alpha is *> complex and beta real. @@ -86,7 +86,7 @@ *> alternate form of the GNEP *> mu*A*y = B*y. *> Real eigenvalues can be read directly from the generalized Schur -*> form: +*> form: *> alpha = S(i,i), beta = P(i,i). *> *> Ref: C.B. Moler & G.W. Stewart, "An Algorithm for Generalized Matrix @@ -101,7 +101,7 @@ *> \verbatim *> JOB is CHARACTER*1 *> = 'E': Compute eigenvalues only; -*> = 'S': Compute eigenvalues and the Schur form. +*> = 'S': Compute eigenvalues and the Schur form. *> \endverbatim *> *> \param[in] COMPQ @@ -211,12 +211,12 @@ *> \param[in,out] Q *> \verbatim *> Q is DOUBLE PRECISION array, dimension (LDQ, N) -*> On entry, if COMPZ = 'V', the orthogonal matrix Q1 used in +*> On entry, if COMPQ = 'V', the orthogonal matrix Q1 used in *> the reduction of (A,B) to generalized Hessenberg form. -*> On exit, if COMPZ = 'I', the orthogonal matrix of left Schur -*> vectors of (H,T), and if COMPZ = 'V', the orthogonal matrix +*> On exit, if COMPQ = 'I', the orthogonal matrix of left Schur +*> vectors of (H,T), and if COMPQ = 'V', the orthogonal matrix *> of left Schur vectors of (A,B). -*> Not referenced if COMPZ = 'N'. +*> Not referenced if COMPQ = 'N'. *> \endverbatim *> *> \param[in] LDQ @@ -277,12 +277,10 @@ * Authors: * ======== * -*> \author Univ. of Tennessee -*> \author Univ. of California Berkeley -*> \author Univ. of Colorado Denver -*> \author NAG Ltd. -* -*> \date November 2013 +*> \author Univ. of Tennessee +*> \author Univ. of California Berkeley +*> \author Univ. of Colorado Denver +*> \author NAG Ltd. * *> \ingroup doubleGEcomputational * @@ -304,10 +302,9 @@ $ ALPHAR, ALPHAI, BETA, Q, LDQ, Z, LDZ, WORK, $ LWORK, INFO ) * -* -- LAPACK computational routine (version 3.5.0) -- +* -- LAPACK computational routine -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* November 2013 * * .. Scalar Arguments .. CHARACTER COMPQ, COMPZ, JOB @@ -531,7 +528,9 @@ * GO TO 80 ELSE - IF( ABS( H( ILAST, ILAST-1 ) ).LE.ATOL ) THEN + IF( ABS( H( ILAST, ILAST-1 ) ).LE.MAX( SAFMIN, ULP*( + $ ABS( H( ILAST, ILAST ) ) + ABS( H( ILAST-1, ILAST-1 ) ) + $ ) ) ) THEN H( ILAST, ILAST-1 ) = ZERO GO TO 80 END IF @@ -551,7 +550,9 @@ IF( J.EQ.ILO ) THEN ILAZRO = .TRUE. ELSE - IF( ABS( H( J, J-1 ) ).LE.ATOL ) THEN + IF( ABS( H( J, J-1 ) ).LE.MAX( SAFMIN, ULP*( + $ ABS( H( J, J ) ) + ABS( H( J-1, J-1 ) ) + $ ) ) ) THEN H( J, J-1 ) = ZERO ILAZRO = .TRUE. ELSE @@ -760,7 +761,7 @@ $ S2, WR, WR2, WI ) * IF ( ABS( (WR/S1)*T( ILAST, ILAST ) - H( ILAST, ILAST ) ) - $ .GT. ABS( (WR2/S2)*T( ILAST, ILAST ) + $ .GT. ABS( (WR2/S2)*T( ILAST, ILAST ) $ - H( ILAST, ILAST ) ) ) THEN TEMP = WR WR = WR2