TESTING/LIN/zgtt02.f(3)

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

πŸ’… TESTING/LIN/zgtt02.f

okay so bestie, this is a page from the Library Functions Manual for LAPACK, and it's literally all about one humble little tester subroutine that checks how good your tridiagonal solve actually is. no cap, it's giving "quality control but make it math." πŸŽ€


✨ SYNOPSIS ✨

Functions/Subroutines

subroutine zgtt02 (trans, n, nrhs, dl, d, du, x, ldx, b, ldb, resid)

ZGTT02 β€” that's the whole vibe, honestly. πŸ¦‹


🧚 Function/Subroutine Documentation 🧚

subroutine zgtt02 (character trans, integer n, integer nrhs, complex*16,
    dimension( * ) dl, complex*16, dimension( * ) d, complex*16, dimension(
    * ) du, complex*16, dimension( ldx, * ) x, integer ldx, complex*16,
    dimension( ldb, * ) b, integer ldb, double precision resid)

ZGTT02 πŸ‘‘

🌸 Purpose 🌸

!> !> ZGTT02 computes the residual for the solution to a tridiagonal !> system of equations: !> RESID = norm(B - op(A)*X) / (norm(op(A)) * norm(X) * EPS), !> where EPS is the machine epsilon. !>

so basically it's out here like "hey, how wrong is your answer, actually?" and it measures that against norm(op(A)) * norm(X) * EPS so the number means something. iconic behavior, fr fr. πŸ“βœ¨

🫢 Parameters 🫢

  • TRANS β€” this one's a CHARACTER, and it specifies the form of the residual, bestie:
!> TRANS is CHARACTER !> Specifies the form of the residual. !> = 'N': B - A * X (No transpose) !> = 'T': B - AT * X (Transpose) !> = 'C': B - AH * X (Conjugate transpose) !>
  • N β€” an INTEGER, and it's the order of the matrix A. constraint era: N >= 0.
!> N is INTEGER !> The order of the matrix A. N >= 0. !>
  • NRHS β€” INTEGER, the number of right hand sides, i.e. the number of columns of the matrices B and X. also NRHS >= 0, no exceptions.
!> NRHS is INTEGER !> The number of right hand sides, i.e., the number of columns !> of the matrices B and X. NRHS >= 0. !>
  • DL β€” a COMPLEX*16 array, dimension (N-1). it's the (n-1) sub-diagonal elements of A. the under-appreciated ones. πŸ™ˆ
!> DL is COMPLEX*16 array, dimension (N-1) !> The (n-1) sub-diagonal elements of A. !>
  • D β€” COMPLEX*16 array, dimension (N). the diagonal elements of A β€” the main character energy of the matrix, obviously. ⭐
!> D is COMPLEX*16 array, dimension (N) !> The diagonal elements of A. !>
  • DU β€” COMPLEX*16 array, dimension (N-1). the (n-1) super-diagonal elements of A. yes queen, float above the diagonal. πŸ¦‹
!> DU is COMPLEX*16 array, dimension (N-1) !> The (n-1) super-diagonal elements of A. !>
  • X β€” COMPLEX*16 array, dimension (LDX,NRHS). these are the computed solution vectors X. the actual answers, the moment of truth. πŸ”₯
!> X is COMPLEX*16 array, dimension (LDX,NRHS) !> The computed solution vectors X. !>
  • LDX β€” INTEGER, the leading dimension of the array X. rule: LDX >= max(1,N). respect the leading dimension or perish.
!> LDX is INTEGER !> The leading dimension of the array X. LDX >= max(1,N). !>
  • B β€” COMPLEX*16 array, dimension (LDB,NRHS). on entry it's the right hand side vectors for the system of linear equations. but on exit, B is overwritten with the difference B - op(A)*X β€” so heads up, your input does not survive the call. πŸ’€
!> B is COMPLEX*16 array, dimension (LDB,NRHS) !> On entry, the right hand side vectors for the system of !> linear equations. !> On exit, B is overwritten with the difference B - op(A)*X. !>
  • LDB β€” INTEGER, the leading dimension of the array B. rule: LDB >= max(1,N). same energy as LDX, different letter. πŸ’…
!> LDB is INTEGER !> The leading dimension of the array B. LDB >= max(1,N). !>
  • RESID β€” a DOUBLE PRECISION, and this is the whole point of the exercise:
!> RESID is DOUBLE PRECISION !> norm(B - op(A)*X) / (norm(op(A)) * norm(X) * EPS) !>

πŸ‘‘ Author πŸ‘‘

  • Univ. of Tennessee
  • Univ. of California Berkeley
  • Univ. of Colorado Denver
  • NAG Ltd.

Definition at line 122 of file zgtt02.f. πŸ“


🌈 Author 🌈

Generated automatically by Doxygen for LAPACK from the source code. (not me writing this by hand, the robots did it, slay πŸ€–βœ¨)


and that's the page, bestie β€” LAPACK, Version 3.12.0, with the date tucked into the footer as TESTING/LIN/zgtt02.f(3). go forth and check those residuals. periodt. πŸ’œπŸ“

πŸ“¦ where this page comes from