ZCHKHS(3)
π ZCHKHS(3) β Library Functions Manual π
okay so bestie, welcome to the ZCHKHS page β ngl, it's a whole vibe, lowkey iconic, and I'm obsessed. We're keeping literally every single detail because that's the assignment. This is the Library Functions Manual entry, and no cap, it's giving main character energy. β¨ slay. periodt. π
π·οΈ NAME π·οΈ
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/TESTING/EIG/zchkhs.f
That's the exact path, character for character β do not let anyone "clean it up" on you. π
π SYNOPSIS π
π§© Functions/Subroutines π§©
subroutine ZCHKHS (nsizes, nn, ntypes, dotype, iseed, thresh, nounit, a,
lda, h, t1, t2, u, ldu, z, uz, w1, w3, evectl, evectr, evecty,
evectx, uu, tau, work, nwork, rwork, iwork, select, result, info)
ZCHKHS
β¨ Function/Subroutine Documentation β¨
π subroutine ZCHKHS π
subroutine ZCHKHS (integer nsizes, integer, dimension( * ) nn, integer
ntypes, logical, dimension( * ) dotype, integer, dimension( 4 ) iseed,
double precision thresh, integer nounit, complex*16, dimension( lda, * )
a, integer lda, complex*16, dimension( lda, * ) h, complex*16,
dimension( lda, * ) t1, complex*16, dimension( lda, * ) t2, complex*16,
dimension( ldu, * ) u, integer ldu, complex*16, dimension( ldu, * ) z,
complex*16, dimension( ldu, * ) uz, complex*16, dimension( * ) w1,
complex*16, dimension( * ) w3, complex*16, dimension( ldu, * ) evectl,
complex*16, dimension( ldu, * ) evectr, complex*16, dimension( ldu, * )
evecty, complex*16, dimension( ldu, * ) evectx, complex*16, dimension(
ldu, * ) uu, complex*16, dimension( * ) tau, complex*16, dimension( * )
work, integer nwork, double precision, dimension( * ) rwork, integer,
dimension( * ) iwork, logical, dimension( * ) select, double precision,
dimension( 16 ) result, integer info)
ZCHKHS
π Purpose π
ZCHKHS checks the nonsymmetric eigenvalue problem routines, and that's the whole assignment, fr fr. It's the group-chat organizer of all these checks β every routine below gets its vibe check. π«Ά
ZGEHRDfactorsAasU H U', where'means conjugate transpose,His hessenberg, andUis unitary.ZUNGHRgenerates the unitary matrixU.ZUNMHRmultiplies a matrix by the unitary matrixU.ZHSEQRfactorsHasZ T Z', whereZis unitary andTis upper triangular. It also computes the eigenvalues,w(1), ..., w(n); we define a diagonal matrixWwhose (diagonal) entries are the eigenvalues.ZTREVCcomputes the left eigenvector matrixLand the right eigenvector matrixRfor the matrixT. The columns ofLare the complex conjugates of the left eigenvectors ofT. The columns ofRare the right eigenvectors ofT.Lis lower triangular, andRis upper triangular.ZHSEINcomputes the left eigenvector matrixYand the right eigenvector matrixXfor the matrixH. The columns ofYare the complex conjugates of the left eigenvectors ofH. The columns ofXare the right eigenvectors ofH.Yis lower triangular, andXis upper triangular.ZTREVC3computes left and right eigenvector matrices from a Schur matrixTand backtransforms them withZto eigenvector matricesLandRforA.LandRare GE matrices.
When ZCHKHS is called, a number of matrix () and a number of matrix () are specified. For each size () and each type of matrix, one matrix will be generated and used to test the nonsymmetric eigenroutines. For each matrix, 16 tests will be performed:
(1)β| A - U H U**H | / ( |A| n ulp )(2)β| I - UU**H | / ( n ulp )(3)β| H - Z T Z**H | / ( |H| n ulp )(4)β| I - ZZ**H | / ( n ulp )(5)β| A - UZ H (UZ)**H | / ( |A| n ulp )(6)β| I - UZ (UZ)**H | / ( n ulp )(7)β| T(Z computed) - T(Z not computed) | / ( |T| ulp )(8)β| W(Z computed) - W(Z not computed) | / ( |W| ulp )(9)β| TR - RW | / ( |T| |R| ulp )(10)β| L**H T - W**H L | / ( |T| |L| ulp )(11)β| HX - XW | / ( |H| |X| ulp )(12)β| Y**H H - W**H Y | / ( |H| |Y| ulp )(13)β| AX - XW | / ( |A| |X| ulp )(14)β| Y**H A - W**H Y | / ( |A| |Y| ulp )(15)β| AR - RW | / ( |A| |R| ulp )(16)β| LA - WL | / ( |A| |L| ulp )
The () are specified by an array NN(1:NSIZES); the value of each element NN(j) specifies one size. The () are specified by a logical array DOTYPE( 1:NTYPES ); if DOTYPE(j) is .TRUE., then matrix type () will be generated. Currently, the list of possible types is:
(1)β The zero matrix.(2)β The identity matrix.(3)β A (transposed) Jordan block, with1's on the diagonal.(4)β A diagonal matrix with evenly spaced entries1, ..., ULPand random complex angles. (ULP = (first number larger than 1) - 1)(5)β A diagonal matrix with geometrically spaced entries1, ..., ULPand random complex angles.(6)β A diagonal matrix with entries1, ULP, ..., ULPand random complex angles.(7)β Same as(4), but multiplied bySQRT( overflow threshold )(8)β Same as(4), but multiplied bySQRT( underflow threshold )(9)β A matrix of the formU' T U, whereUis unitary andThas evenly spaced entries1, ..., ULPwith random complex angles on the diagonal and randomO(1)entries in the upper triangle.(10)β A matrix of the formU' T U, whereUis unitary andThas geometrically spaced entries1, ..., ULPwith random complex angles on the diagonal and randomO(1)entries in the upper triangle.(11)β A matrix of the formU' T U, whereUis unitary andThas entries1, ULP,..., ULPwith random complex angles on the diagonal and randomO(1)entries in the upper triangle.(12)β A matrix of the formU' T U, whereUis unitary andThas complex eigenvalues randomly chosen fromULP < |z| < 1and randomO(1)entries in the upper triangle.(13)β A matrix of the formX' T X, whereXhas conditionSQRT( ULP )andThas evenly spaced entries1, ..., ULPwith random complex angles on the diagonal and randomO(1)entries in the upper triangle.(14)β A matrix of the formX' T X, whereXhas conditionSQRT( ULP )andThas geometrically spaced entries1, ..., ULPwith random complex angles on the diagonal and randomO(1)entries in the upper triangle.(15)β A matrix of the formX' T X, whereXhas conditionSQRT( ULP )andThas entries1, ULP,..., ULPwith random complex angles on the diagonal and randomO(1)entries in the upper triangle.(16)β A matrix of the formX' T X, whereXhas conditionSQRT( ULP )andThas complex eigenvalues randomly chosen fromULP < |z| < 1and randomO(1)entries in the upper triangle.(17)β Same as(16), but multiplied bySQRT( overflow threshold )(18)β Same as(16), but multiplied bySQRT( underflow threshold )(19)β Nonsymmetric matrix with random entries chosen from|z| < 1(20)β Same as(19), but multiplied bySQRT( overflow threshold )(21)β Same as(19), but multiplied bySQRT( underflow threshold )
NSIZESβ INTEGER. The number of sizes of matrices to use. If it is zero,ZCHKHSdoes nothing. It must be at least zero. Not modified. β¨NNβ INTEGER array, dimension(NSIZES). An array containing the sizes to be used for the matrices. Zero values will be skipped. The values must be at least zero. Not modified. πNTYPESβ INTEGER. The number of elements inDOTYPE. If it is zero,ZCHKHSdoes nothing. It must be at least zero. If it isMAXTYP+1andNSIZESis1, then an additional type,MAXTYP+1is defined, which is to use whatever matrix is inA. This is only useful ifDOTYPE(1:MAXTYP)is.FALSE.andDOTYPE(MAXTYP+1)is.TRUE.. Not modified. πDOTYPEβ LOGICAL array, dimension(NTYPES). IfDOTYPE(j)is.TRUE., then for each size inNNa matrix of that size and of typejwill be generated. IfNTYPESis smaller than the maximum number of types defined (PARAMETER MAXTYP), then typesNTYPES+1throughMAXTYPwill not be generated. IfNTYPESis larger thanMAXTYP,DOTYPE(MAXTYP+1)throughDOTYPE(NTYPES)will be ignored. Not modified. π¦ISEEDβ INTEGER array, dimension(4). On entryISEEDspecifies the seed of the random number generator. The array elements should be between0and4095; if not they will be reduced mod4096. Also,ISEED(4)must be odd. The random number generator uses a linear congruential sequence limited to small integers, and so should produce machine independent random numbers. The values ofISEEDare changed on exit, and can be used in the next call toZCHKHSto continue the same random number sequence. Modified. π₯THRESHβ DOUBLE PRECISION. Heads up, the text literally says: a test will count as if the , computed as described above, exceedsTHRESH. Note that the error is scaled to beO(1), soTHRESHshould be a reasonably small multiple of1, e.g.,10or100. In particular, it should not depend on the precision (single vs. double) or the size of the matrix. It must be at least zero. Not modified. π§NOUNITβ INTEGER. The FORTRAN unit number for printing out error messages (e.g., if a routine returnsIINFOnot equal to0.) Not modified. πΈAβ COMPLEX16 array*, dimension(LDA,max(NN)). Used to hold the matrix whose eigenvalues are to be computed. On exit,Acontains the last matrix actually used. Modified. πLDAβ INTEGER. The leading dimension ofA,H,T1andT2. It must be at least1and at leastmax( NN ). Not modified. βHβ COMPLEX16 array*, dimension(LDA,max(NN)). The upper hessenberg matrix computed byZGEHRD. On exit,Hcontains the Hessenberg form of the matrix inA. Modified. πT1β COMPLEX16 array*, dimension(LDA,max(NN)). The Schur(=)matrix computed byZHSEQRifZis computed. On exit,T1contains the Schur form of the matrix inA. Modified. πT2β COMPLEX16 array*, dimension(LDA,max(NN)). The Schur matrix computed byZHSEQRwhenZis not computed. This should be identical toT1. Modified. πLDUβ INTEGER. The leading dimension ofU,Z,UZandUU. It must be at least1and at leastmax( NN ). Not modified. π«ΆUβ COMPLEX16 array*, dimension(LDU,max(NN)). The unitary matrix computed byZGEHRD. Modified. πZβ COMPLEX16 array*, dimension(LDU,max(NN)). The unitary matrix computed byZHSEQR. Modified. β¨UZβ COMPLEX16 array*, dimension(LDU,max(NN)). The product ofUtimesZ. Modified. π¦W1β COMPLEX16 array*, dimension(max(NN)). The eigenvalues ofA, as computed by a full Schur decompositionH = Z T Z'. On exit,W1contains the eigenvalues of the matrix inA. Modified. πΈW3β COMPLEX16 array*, dimension(max(NN)). The eigenvalues ofA, as computed by a partial Schur decomposition (Znot computed,Tonly computed as much as is necessary for determining eigenvalues). On exit,W3contains the eigenvalues of the matrix inA, possibly perturbed byZHSEIN. Modified. π₯EVECTLβ COMPLEX16 array*, dimension(LDU,max(NN)). The conjugate transpose of the (upper triangular) left eigenvector matrix for the matrix inT1. Modified. πEVEZTRβ COMPLEX16 array*, dimension(LDU,max(NN)). The (upper triangular) right eigenvector matrix for the matrix inT1. Modified. πEVECTYβ COMPLEX16 array*, dimension(LDU,max(NN)). The conjugate transpose of the left eigenvector matrix for the matrix inH. Modified. βEVECTXβ COMPLEX16 array*, dimension(LDU,max(NN)). The right eigenvector matrix for the matrix inH. Modified. πUUβ COMPLEX16 array*, dimension(LDU,max(NN)). Details of the unitary matrix computed byZGEHRD. Modified. π«ΆTAUβ COMPLEX16 array*, dimension(max(NN)). Further details of the unitary matrix computed byZGEHRD. Modified. πWORKβ COMPLEX16 array*, dimension(NWORK). Workspace. Modified. β¨NWORKβ INTEGER. The number of entries inWORK.NWORK >= 4*NN(j)*NN(j) + 2. πRWORKβ DOUBLE PRECISION array, dimension(max(NN)). Workspace. Could be equivalenced toIWORK, but notSELECT. Modified. πΈIWORKβ INTEGER array, dimension(max(NN)). Workspace. Modified. π₯SELECTβ LOGICAL array, dimension(max(NN)). Workspace. Could be equivalenced toIWORK, but notRWORK. Modified. πRESULTβ DOUBLE PRECISION array, dimension(16). The values computed by the fourteen tests described above. The values are currently limited to1/ulp, to avoid overflow. Modified. βINFOβ INTEGER. If0, then everything ran OK.-1:NSIZES < 0-2: SomeNN(j) < 0-3:NTYPES < 0-6:THRESH < 0-9:LDA < 1orLDA < NMAX, whereNMAXismax( NN(j) ).-14:LDU < 1orLDU < NMAX.-26:NWORKtoo small.- If
ZLATMR,CLATMS, orCLATMEreturns an error code, the absolute value of it is returned. - If
1, thenZHSEQRcould not find all the shifts. - If
2, then the EISPACK code (for small blocks) failed. - If
>2, then30*Niterations were not enough to find an eigenvalue or to decompose the problem.
Modified. π¦
π§ Some Local Variables and Parameters π§
ZERO,ONEβ Real0and1. β¨MAXTYPβ The number of types defined. πMTESTβ The number of tests defined: care must be taken that (1) the size ofRESULT, (2) the number of tests actually performed, and (3)MTESTagree. πNTESTβ The number of tests performed on this matrix so far. This should be less thanMTEST, and equal to it by the last test. It will be less if any of the routines being tested indicates that it could not compute the matrices that would be tested. πΈNMAXβ Largest value inNN. π₯NMATSβ The number of matrices generated so far. πNERRSβ The number of tests which have exceededTHRESHso far (computed byDLAFTS). βCOND,CONDS,IMODEβ Values to be passed to the matrix generators. π¦ANORMβ Norm ofA; passed to matrix generators. π«ΆOVFL,UNFLβ Overflow and underflow thresholds. πULP,ULPINVβ Finest relative precision and its inverse. β¨RTOVFL,RTUNFL,RTULP,RTULPIβ Square roots of the previous 4 values. π
The following four arrays decode JTYPE:
KTYPE(j)β The general type(1-10)for type . πKMODE(j)β TheMODEvalue to be passed to the matrix generator for type . πKMAGN(j)β The order of magnitude (O(1),O(overflow^(1/2) ),O(underflow^(1/2) )πΈKCONDS(j)β Selects whetherCONDSis to be1or1/sqrt(ulp). (0means irrelevant.) π₯
π Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 416 of file zchkhs.f. π
π AUTHOR π
okay so plot twist: there's no mysterious human author to stan here π the "author" is literally Doxygen, the doc generator. That's the whole main character of this section, no cap:
- Generated automatically by
DoxygenforLAPACKfrom the source code.
so likeβ¦ nobody hand-wrote this, it's a bot doing its little bot thing off the actual source, which is honestly kind of iconic of it π«Ά
and that's the whole page, bestie!! π¦ you made it to the end, i'm so proud πβ¨ this was LAPACK Version 3.12.0, and the source file we've been hyping up the entire time is /home/abui...IG/zchkhs.f(3). go forth and zchkhs responsibly, mwah πππ
π¦ where this page comes from
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms