TESTING/LIN/zget04.f(3)

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

πŸ’… TESTING/LIN/zget04.f β€” bestie's fave little residual checker ✨

okay so picture this: it's a Fortran file in TESTING/LIN, and it's the one that stares at your computed answer and your exact answer and goes "hmm. bestie. how far off are we, actually?" πŸŽ€ Folding the manual name in right here so you know what you're looking at: zget04.f(3), straight out of the LAPACK library functions manual.


✨ SYNOPSIS ✨

Functions/Subroutines πŸ¦‹

  • subroutine zget04 (n, nrhs, x, ldx, xact, ldxact, rcond, resid) β€” literally just ZGET04, living its best life, doing one job and doing it well πŸ’…

🫢 Function/Subroutine Documentation 🫢

subroutine zget04 (integer n, integer nrhs, complex*16, dimension( ldx, * )
    x, integer ldx, complex*16, dimension( ldxact, * ) xact, integer ldxact,
    double precision rcond, double precision resid)

ZGET04 πŸ‘‘ β€” that's the name, no cap.

πŸ“ Purpose πŸ“

!> ZGET04 computes the difference between a computed solution and the !> true solution to a system of linear equations. !> !> RESID = ( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS ), !> where RCOND is the reciprocal of the condition number and EPS is the !> machine epsilon. !>

So like… it takes your computed solution, compares it to the true one, and spits out a residual scaled by the condition number and machine epsilon. It's giving "who are you really, mathematically speaking" energy πŸ”₯ note that RESID is scaled by RCOND and EPS in exactly that formula β€” keep it, memorize it, it's iconic.


🌈 Parameters 🌈

  • N β€” INTEGER, obvi πŸ’– The number of rows of the matrices X and XACT. Constraint: N >= 0.
!> N is INTEGER !> The number of rows of the matrices X and XACT. N >= 0.
  • NRHS β€” INTEGER, the right-hand-side count, the column count, the whole vibe πŸ¦‹ The number of columns of the matrices X and XACT. Constraint: NRHS >= 0.
!> NRHS is INTEGER !> The number of columns of the matrices X and XACT. NRHS >= 0.
  • X β€” COMPLEX*16 array, dimension (LDX,NRHS) ✨ The computed solution vectors β€” and each vector is stored as a column of the matrix X.
!> X is COMPLEX*16 array, dimension (LDX,NRHS) !> The computed solution vectors. Each vector is stored as a !> column of the matrix X.
  • LDX β€” INTEGER, the leading dimension flex πŸ’… The leading dimension of the array X. Constraint: LDX >= max(1,N).
!> LDX is INTEGER !> The leading dimension of the array X. LDX >= max(1,N).
  • XACT β€” COMPLEX*16 array, dimension (LDX,NRHS) β€” wait, bestie, read it exactly as written in the source: it's documented as dimension (LDX,NRHS) with leading dimension described below as LDXACT πŸŽ€ The exact solution vectors, each stored as a column of the matrix XACT.
!> XACT is COMPLEX*16 array, dimension (LDX,NRHS) !> The exact solution vectors. Each vector is stored as a !> column of the matrix XACT.
  • LDXACT β€” INTEGER 🌸 The leading dimension of the array XACT. Constraint: LDXACT >= max(1,N).
!> LDXACT is INTEGER !> The leading dimension of the array XACT. LDXACT >= max(1,N).
  • RCOND β€” DOUBLE PRECISION ⭐ The reciprocal of the condition number of the coefficient matrix in the system of equations. (Yes, the reciprocal. Don't come for me, that's what it says.)
!> RCOND is DOUBLE PRECISION !> The reciprocal of the condition number of the coefficient !> matrix in the system of equations.
  • RESID β€” DOUBLE PRECISION πŸ’€ The output, the moment of truth: the maximum over the NRHS solution vectors of ( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS )
!> RESID is DOUBLE PRECISION !> The maximum over the NRHS solution vectors of !> ( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS )

πŸ‘‘ Author πŸ‘‘

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

(Group project, but make it Fortran 🫢)


🧚 Definition 🧚

Definition at line 101 of file zget04.f.


πŸ’œ Author (the meta one) πŸ’œ

Generated automatically by Doxygen for LAPACK from the source code. Not a human, just vibes and a parser 🌸


okay that's the whole page, no details left behind, periodt πŸ’… and for the cute sign-off: this little masterpiece is from LAPACK, Version 3.12.0, page TESTING/LIN/zget04.f(3) β€” go forth and compute your residuals, bestie, you're gonna slay πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from