SRC/dgbequb.f(3)
π SRC/dgbequb.f π
okay so bestie, we're looking at SRC/dgbequb.f(3) β a page straight out of the LAPACK Library Functions Manual, and honestly? she's giving linear algebra icon. it's DGBEQUB, a Fortran subroutine that does scaling math, and yes it has a lot of arguments. don't panic. we got this. π«Ά
β¨ SYNOPSIS β¨
Functions/Subroutines
subroutine dgbequb (m, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd, amax, info)β that's her! that'sDGBEQUBπ
π Function/Subroutine Documentation π
subroutine dgbequb (integer m, integer n, integer kl, integer ku, double
precision, dimension( ldab, * ) ab, integer ldab, double precision,
dimension( * ) r, double precision, dimension( * ) c, double precision
rowcnd, double precision colcnd, double precision amax, integer info)
DGBEQUB β say it with me: dee-gee-bee-ee-kew-bee. iconic name, no notes. π
π― Purpose π―
okay so here's the whole vibe, fr fr:
DGBEQUBcomputes row and column scalings intended to equilibrate an M-by-N matrix A and reduce its condition number.Rreturns the row scale factors andCthe column scale factors, chosen to try to make the largest element in each row and column of the matrix B with elementsB(i,j)=R(i)*A(i,j)*C(j)have an absolute value of at most the radix.
so basically it's trying to make your matrix chill β scale it down so nothing is screaming too loud. π
R(i)andC(j)are restricted to be a power of the radix betweenSMLNUM= smallest safe number andBIGNUM= largest safe number. Use of these scaling factors is not guaranteed to reduce the condition number of A but works well in practice.
lowkey can't promise the condition number goes down, but she tries her best and honestly that's enough. π
This routine differs fromDGEEQUby restricting the scaling factors to a power of the radix. Barring over- and underflow, scaling by these factors introduces no additional rounding errors. However, the scaled entries' magnitudes are no longer approximately 1 but lie betweensqrt(radix)and1/sqrt(radix).
this is the main character difference between her and DGEEQU β power of the radix only, so no extra rounding errors, but the scaled entries live between sqrt(radix) and 1/sqrt(radix) instead of hovering around 1. iykyk. β¨
πΈ Parameters πΈ
grab a snack, bestie, because there are twelve of these. all facts, no cap:
MβMis INTEGER. The number of rows of the matrix A.M >= 0. π’NβNis INTEGER. The number of columns of the matrix A.N >= 0. π’KLβKLis INTEGER. The number of subdiagonals within the band of A.KL >= 0. πKUβKUis INTEGER. The number of superdiagonals within the band of A.KU >= 0. πABβABis DOUBLE PRECISION array, dimension(LDAB,N). On entry, the matrix A in band storage, in rows1toKL+KU+1. The j-th column of A is stored in the j-th column of the arrayABas follows:
AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
this indexing situation is a whole journey but it's exactly right, copy it character for character please π«Ά
LDABβLDABis INTEGER. The leading dimension of the array A.LDAB >= max(1,M). βRβRis DOUBLE PRECISION array, dimension(M). IfINFO = 0orINFO > M,Rcontains the row scale factors for A. πCβCis DOUBLE PRECISION array, dimension(N). IfINFO = 0,Ccontains the column scale factors for A. πROWCNDβROWCNDis DOUBLE PRECISION. IfINFO = 0orINFO > M,ROWCNDcontains the ratio of the smallestR(i)to the largestR(i). IfROWCND >= 0.1andAMAXis neither too large nor too small, it is not worth scaling byR. π§COLCNDβCOLCNDis DOUBLE PRECISION. IfINFO = 0,COLCNDcontains the ratio of the smallestC(i)to the largestC(i). IfCOLCND >= 0.1, it is not worth scaling byC. π§AMAXβAMAXis DOUBLE PRECISION. Absolute value of largest matrix element. IfAMAXis very close to overflow or very close to underflow, the matrix should be scaled. β οΈINFOβINFOis INTEGER, and she's the vibe check of the whole operation:= 0: successful exit π< 0: ifINFO = -i, the i-th argument had an illegal value π> 0: ifINFO = i, and i is<= M: the i-th row of A is exactly zero π> M: the (i-M)-th column of A is exactly zero π
no cap, an exactly-zero row or column is a real situation. check your INFO before you trust anything, bestie.
π Author π
these absolute legends wrote her:
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
definition at line 158 of file dgbequb.f. that's the receipts. π
π Author (the other one) π
generated automatically by Doxygen for LAPACK from the source code. so she's not hand-written, she's curated. π
π that's the whole page, bestie. go scale something responsibly. π
LAPACK Β· Version 3.12.0 Β· SRC/dgbequb.f(3) β mwah, hope this helped, slay, periodt πβ¨π¦
π¦ 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