TESTING/EIG/zbdt01.f(3)

πŸ“¦
version 3.12.1 Β· 3 versions
, in arch rolling

πŸŽ€ 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