TESTING/EIG/cchkbb.f(3)
π TESTING/EIG/cchkbb.f(3) β Library Functions Manual π
okay bestie, this is the TESTING/EIG/cchkbb.f(3) page and it is so much. Itβs giving βI test the reduction of a general complex rectangular band matrix to real bidiagonal formβ and honestly? iconic. Letβs go π
πΈ NAME πΈ
TESTING/EIG/cchkbb.f
β¨ SYNOPSIS β¨
π¦ Functions/Subroutines π¦
subroutine cchkbbβ the whole squad of arguments, coming right up:
subroutine cchkbb (nsizes, mval, nval, nwdths, kk, ntypes, dotype, nrhs,
iseed, thresh, nounit, a, lda, ab, ldab, bd, be, q, ldq, p, ldp, c,
ldc, cc, work, lwork, rwork, result, info)
CCHKBB
π Function/Subroutine Documentation π
π§ subroutine cchkbb π§
subroutine cchkbb (integer nsizes, integer, dimension( * ) mval, integer,
dimension( * ) nval, integer nwdths, integer, dimension( * ) kk, integer
ntypes, logical, dimension( * ) dotype, integer nrhs, integer,
dimension( 4 ) iseed, real thresh, integer nounit, complex, dimension(
lda, * ) a, integer lda, complex, dimension( ldab, * ) ab, integer ldab,
real, dimension( * ) bd, real, dimension( * ) be, complex, dimension(
ldq, * ) q, integer ldq, complex, dimension( ldp, * ) p, integer ldp,
complex, dimension( ldc, * ) c, integer ldc, complex, dimension( ldc, *
) cc, complex, dimension( * ) work, integer lwork, real, dimension( * )
rwork, real, dimension( * ) result, integer info)
CCHKBB
CCHKBB β yes bestie, thatβs the name, periodt π
π Purpose π
okay so CCHKBB tests the reduction of a general complex rectangular band matrix to real bidiagonal form. no cap, thatβs the whole assignment.
CGBBRD factors a general band matrix A as Q B P*, where * means conjugate transpose, B is upper bidiagonal, and Q and P are unitary; CGBBRD can also overwrite a given matrix C with Q* C.
For each pair of matrix dimensions (M,N) and each selected matrix type, an M by N matrix A and an M by NRHS matrix C are generated. The problem dimensions are as follows:
A: M x N
Q: M x M
P: N x N
B: min(M,N) x min(M,N)
C: M x NRHS
For each generated matrix, 4 tests are performed:
| A - Q B PT | / ( |A| max(M,N) ulp ), PT = P'| I - Q' Q | / ( M ulp )| I - PT PT' | / ( N ulp )| Y - Q' C | / ( |Y| max(M,NRHS) ulp ), where Y = Q' C.
The types are specified by a logical array DOTYPE( 1:NTYPES ); if DOTYPE(j) is .TRUE., then matrix type j will be generated. Currently, the list of possible types is:
The possible matrix types are
(1) The zero matrix.
(2) The identity matrix.
(3) A diagonal matrix with evenly spaced entries 1, ..., ULP and random signs. (ULP = (first number larger than 1) - 1)
(4) A diagonal matrix with geometrically spaced entries 1, ..., ULP and random signs.
(5) A diagonal matrix with entries 1, ULP, ..., ULP and random signs.
(6) Same as (3), but multiplied by SQRT( overflow threshold )
(7) Same as (3), but multiplied by SQRT( underflow threshold )
(8) A matrix of the form U D V, where U and V are orthogonal and D has evenly spaced entries 1, ..., ULP with random signs on the diagonal.
(9) A matrix of the form U D V, where U and V are orthogonal and D has geometrically spaced entries 1, ..., ULP with random signs on the diagonal.
(10) A matrix of the form U D V, where U and V are orthogonal and D has entries 1, ULP,..., ULP with random signs on the diagonal.
(11) Same as (8), but multiplied by SQRT( overflow threshold )
(12) Same as (8), but multiplied by SQRT( underflow threshold )
(13) Rectangular matrix with random entries chosen from (-1,1).
(14) Same as (13), but multiplied by SQRT( overflow threshold )
(15) Same as (13), but multiplied by SQRT( underflow threshold )
πΈ Parameters πΈ
NSIZESβNSIZESisINTEGER. The number of values ofMandNcontained in the vectorsMVALandNVAL. The matrix sizes are used in pairs(M,N). IfNSIZESis zero,CCHKBBdoes nothing.NSIZESmust be at least zero. πMVALβMVALisINTEGER array, dimension (NSIZES). The values of the matrix row dimensionM.NVALβNVALisINTEGER array, dimension (NSIZES). The values of the matrix column dimensionN.NWDTHSβNWDTHSisINTEGER. The number of bandwidths to use. If it is zero,CCHKBBdoes nothing. It must be at least zero.KKβKKisINTEGER array, dimension (NWDTHS). An array containing the bandwidths to be used for the band matrices. The values must be at least zero.NTYPESβNTYPESisINTEGER. The number of elements inDOTYPE. If it is zero,CCHKBBdoes nothing. It must be at least zero. If it isMAXTYP+1andNSIZESis 1, 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..DOTYPEβDOTYPEisLOGICAL 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.NRHSβNRHSisINTEGER. The number of columns in the matrixC. IfNRHS = 0, then the operations on the right-hand side will not be tested.NRHSmust be at least 0.ISEEDβISEEDisINTEGER array, dimension (4). On entryISEEDspecifies the seed of the random number generator. The array elements should be between 0 and 4095; if not they will be reduced mod 4096. 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 toCCHKBBto continue the same random number sequence.THRESHβTHRESHisREAL. A test will count as a fail if the error ratio, computed as described above, exceedsTHRESH. Note that the error is scaled to beO(1), soTHRESHshould be a reasonably small multiple of 1, 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.NOUNITβNOUNITisINTEGER. TheFORTRANunit number for printing out error messages (e.g., if a routine returnsIINFOnot equal to 0.)AβAisREAL array, dimension (LDA, max(NN)). Used to hold the matrixA.LDAβLDAisINTEGER. The leading dimension ofA. It must be at least 1 and at leastmax( NN ).ABβABisREAL array, dimension (LDAB, max(NN)). Used to holdAin band storage format.LDABβLDABisINTEGER. The leading dimension ofAB. It must be at least 2 (not 1!) and at leastmax( KK )+1.BDβBDisREAL array, dimension (max(NN)). Used to hold the diagonal of the bidiagonal matrix computed byCGBBRD.BEβBEisREAL array, dimension (max(NN)). Used to hold the off-diagonal of the bidiagonal matrix computed byCGBBRD.QβQisCOMPLEX array, dimension (LDQ, max(NN)). Used to hold the unitary matrixQcomputed byCGBBRD.LDQβLDQisINTEGER. The leading dimension ofQ. It must be at least 1 and at leastmax( NN ).PβPisCOMPLEX array, dimension (LDP, max(NN)). Used to hold the unitary matrixPcomputed byCGBBRD.LDPβLDPisINTEGER. The leading dimension ofP. It must be at least 1 and at leastmax( NN ).CβCisCOMPLEX array, dimension (LDC, max(NN)). Used to hold the matrixCupdated byCGBBRD.LDCβLDCisINTEGER. The leading dimension ofU. It must be at least 1 and at leastmax( NN ).CCβCCisCOMPLEX array, dimension (LDC, max(NN)). Used to hold a copy of the matrixC.WORKβWORKisCOMPLEX array, dimension (LWORK).LWORKβLWORKisINTEGER. The number of entries inWORK. This must be at leastmax( LDA+1, max(NN)+1 )*max(NN).RWORKβRWORKisREAL array, dimension (max(NN)).RESULTβRESULTisREAL array, dimension (4). The values computed by the tests described above. The values are currently limited to1/ulp, to avoid overflow.INFOβ (this part of the page stops here, bestie β part 2 has the rest ofINFOπ)INFO(INTEGER) β if it comes back as0, literally everything ran OK, no notes, we love to see it π
π«Ά Some Local Variables and Parameters (the supporting cast, and yes they all ate)
The original page literally spells out the section title as ---- ----- --------- --- ---------- under it, so here's that whole lineup explained, bestie:
ZERO,ONEβ the real numbers 0 and 1. iconic basics, they never miss β¨MAXTYPβ how many types are defined, periodt.NTESTβ the number of tests performed β or like, the ones that can be performed so far β for the current matrix.NTESTTβ the total number of tests performed so far across the whole saga.NMAXβ the largest value inNN.NMATSβ the number of matrices generated so far.NERRSβ the number of tests that have exceededTHRESHso far π (the oopsies counter)COND,IMODEβ values that get passed to the matrix generators.ANORMβ the norm ofA, which also gets passed to the matrix generators.
Then the threshold girlies:
OVFL,UNFLβ the overflow and underflow thresholds πULP,ULPINVβ the finest relative precision and its inverse π₯RTOVFL,RTUNFLβ the square roots of the previous 2 values π§
And the following four arrays decode JTYPE β lowkey the cheat sheet for what kind of matrix you're looking at:
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) ))
ngl those last three lines are written with a little dangling "for type ." in the source and I'm keeping it exactly as it is, that's just how the original vibes, no cap π«Ά
π Author
Not one, not two, not three, but four whole institutions living in the credits:
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 357 of file cchkbb.f β that's the receipts, right there π
π Author (the meta one)
Generated automatically by Doxygen for LAPACK from the source code. Yes bestie, a robot wrote the doc for a program that tests matrix generators, we're living in the future fr fr π€β¨
That's the whole page, we made it to the end, so here's your cute little sign-off: this was LAPACK, Version 3.12.0, doing its thing in TESTING/EIG/cchkbb.f(3). Go forth and vibe check those matrices, queen ππ¦π
π¦ where this page comes from
- arch rolling: lapack-doc 3.12.1-2 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms