TESTING/EIG/zbdt01.f(3)
π TESTING/EIG/zbdt01.f π
okay so bestie, welcome to the zbdt01 page from the LAPACK manual (that's <italic>Library Functions Manual</italic> energy, iykyk) β it's a Fortran file living in TESTING/EIG/, and honestly? it's giving "unsung hero of the test suite". let's get into it π
β¨ SYNOPSIS β¨
πΈ Functions/Subroutines πΈ
here's the whole cast, no gatekeeping:
subroutine zbdt01 (m, n, kd, a, lda, q, ldq, d, e, pt, ldpt, work,
rwork, resid)
aka ZBDT01. that's the name. that's the vibe. π¦
π Function/Subroutine Documentation π
π the full signature, in all its glory π
subroutine zbdt01 (integer m, integer n, integer kd, complex*16, dimension(
lda, * ) a, integer lda, complex*16, dimension( ldq, * ) q, integer ldq,
double precision, dimension( * ) d, double precision, dimension( * ) e,
complex*16, dimension( ldpt, * ) pt, integer ldpt, complex*16,
dimension( * ) work, double precision, dimension( * ) rwork, double
precision resid)
ZBDT01 β that's it, that's the routine π«Ά
β Purpose β
okay so what does this icon actually do? buckle up:
fortran !> !> ZBDT01 reconstructs a general matrix A from its bidiagonal form !> A = Q * B * P**H !> where Q (m by min(m,n)) and P**H (min(m,n) by n) are unitary !> matrices and B is bidiagonal. !> !> The test ratio to test the reduction is !> RESID = norm(A - Q * B * P**H) / ( n * norm(A) * EPS ) !> where EPS is the machine precision. !>
so basically: take A, rebuild it as A = Q * B * P**H, and check how badly the reduction fumbled it. the ratio is RESID = norm(A - Q * B * P**H) / ( n * norm(A) * EPS ), where EPS is the machine precision. lowkey a glow-up test. π₯
π Parameters π
every single one, bestie, nothing skipped:
M
fortran !> M is INTEGER !> The number of rows of the matrices A and Q. !>
N
fortran !> N is INTEGER !> The number of columns of the matrices A and P**H. !>
KD
fortran !> KD is INTEGER !> If KD = 0, B is diagonal and the array E is not referenced. !> If KD = 1, the reduction was performed by xGEBRD; B is upper !> bidiagonal if M >= N, and lower bidiagonal if M < N. !> If KD = -1, the reduction was performed by xGBBRD; B is !> always upper bidiagonal. !>
so like, KD = 0 means B is diagonal and E is literally not referenced (she's off duty π), KD = 1 means xGEBRD did the reduction with B upper bidiagonal when M >= N and lower bidiagonal when M < N, and KD = -1 means xGBBRD did it and B is always upper bidiagonal. three moods, pick one β¨
A
fortran !> A is COMPLEX*16 array, dimension (LDA,N) !> The m by n matrix A. >
LDA
fortran !> LDA is INTEGER !> The leading dimension of the array A. LDA >= max(1,M). >
Q
fortran !> Q is COMPLEX*16 array, dimension (LDQ,N) !> The m by min(m,n) unitary matrix Q in the reduction !> A = Q * B * P**H. >
LDQ
fortran !> LDQ is INTEGER !> The leading dimension of the array Q. LDQ >= max(1,M). >
D
fortran !> D is DOUBLE PRECISION array, dimension (min(M,N)) !> The diagonal elements of the bidiagonal matrix B. >
E
fortran !> E is DOUBLE PRECISION array, dimension (min(M,N)-1) !> The superdiagonal elements of the bidiagonal matrix B if !> m >= n, or the subdiagonal elements of B if m < n. >
(remember: if KD = 0 she is NOT invited to the function, bestie π«)
PT
fortran !> PT is COMPLEX*16 array, dimension (LDPT,N) !> The min(m,n) by n unitary matrix P**H in the reduction !> A = Q * B * P**H. >
LDPT
fortran !> LDPT is INTEGER !> The leading dimension of the array PT. !> LDPT >= max(1,min(M,N)). >
WORK
fortran !> WORK is COMPLEX*16 array, dimension (M+N) >
RWORK
fortran !> RWORK is DOUBLE PRECISION array, dimension (M) >
RESID
fortran !> RESID is DOUBLE PRECISION !> The test ratio: !> norm(A - Q * B * P**H) / ( n * norm(A) * EPS ) >
the main character of the whole page tbh β the test ratio itself π
π§ Author π§
these legends wrote it:
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
and for the record: Definition at line 145 of file zbdt01.f. π
π Author π
Generated automatically by Doxygen for LAPACK from the source code.
(not a human, just a very diligent doc generator doing its thing π«‘)
and that's the whole page, bestie β no notes, no cap. π β¨
LAPACK Β· Version 3.12.0 Β· TESTING/EIG/zbdt01.f(3) β mwah, go forth and test those bidiagonal reductions ππ¦π
π¦ 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