DQRT17(3)

πŸ“¦ version 3.12.0, in opensuse-leap 16.0

πŸ’… DQRT17 πŸ’…

okay so bestie, this is a page from the Library Functions Manual β€” specifically it's the manpage for /home/abui...IN/dqrt17.f(3), and we're about to get into it. it's giving "LAPACK testing routine" and honestly? iconic. πŸŽ€


✨ NAME ✨

/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/TESTING/LIN/dqrt17.f

like, yes, that's literally the whole name. it's a whole path. no notes. πŸ’€


🌸 SYNOPSIS 🌸

Functions/Subroutines

double precision function DQRT17 (trans, iresid, m, n, nrhs, a, lda, x,
    ldx, b, ldb, c, work, lwork)

DQRT17


πŸ¦‹ Function/Subroutine Documentation πŸ¦‹

double precision function DQRT17 (character trans, integer iresid, integer
    m, integer n, integer nrhs, double precision, dimension( lda, * ) a,
    integer lda, double precision, dimension( ldx, * ) x, integer ldx,
    double precision, dimension( ldb, * ) b, integer ldb, double precision,
    dimension( ldb, * ) c, double precision, dimension( lwork ) work,
    integer lwork)

DQRT17

πŸ’œ Purpose πŸ’œ

the way this function just... computes a ratio. no cap, here's the whole vibe:

!>
!> DQRT17 computes the ratio
!>
!>    norm(R**T * op(A)) / ( norm(A) * alpha * max(M,N,NRHS) * EPS ),
!>
!> where R = B - op(A)*X, op(A) is A or A**T, depending on TRANS, EPS
!> is the machine epsilon, and
!>
!>    alpha = norm(B) if IRESID = 1 (zero-residual problem)
!>    alpha = norm(R) if IRESID = 2 (otherwise).
!>
!> The norm used is the 1-norm.
!>

so like, R = B - op(A)*X, op(A) is either A or A**T depending on TRANS, EPS is the machine epsilon, and alpha does a little switch-up based on IRESID. the norm in question? the 1-norm. periodt. ⭐

🌈 Parameters 🌈

okay bestie, here's the cast of characters β€” every single one matters, so let's go:

TRANS

!>          TRANS is CHARACTER*1
!>          Specifies whether or not the transpose of A is used.
!>          = 'N':  No transpose, op(A) = A.
!>          = 'T':  Transpose, op(A) = A**T.
!>

it's a CHARACTER*1 and it decides whether we're doing the transpose thing or not. 'N' = no transpose, op(A) = A. 'T' = transpose, op(A) = A**T. pick your fighter. πŸ’…

IRESID

!>          IRESID is INTEGER
!>          IRESID = 1 indicates zero-residual problem.
!>          IRESID = 2 indicates non-zero residual.
!>

an INTEGER that's like "is the residual zero or not?" β€” 1 means zero-residual problem, 2 means non-zero residual. simple as that. 🫢

M

!>          M is INTEGER
!>          The number of rows of the matrix A.
!>          If TRANS = 'N', the number of rows of the matrix B.
!>          If TRANS = 'T', the number of rows of the matrix X.
!>

INTEGER, and it's the number of rows of A. also: if TRANS = 'N' it's the rows of B, and if TRANS = 'T' it's the rows of X. multitasking queen. πŸ‘‘

N

!>          N is INTEGER
!>          The number of columns of the matrix  A.
!>          If TRANS = 'N', the number of rows of the matrix X.
!>          If TRANS = 'T', the number of rows of the matrix B.
!>

INTEGER, number of columns of A. if TRANS = 'N' it's also the rows of X; if TRANS = 'T' it's the rows of B. (notice there's literally two spaces in "matrix A" up there β€” preserving that fr fr, character for character.) 😭

NRHS

!>          NRHS is INTEGER
!>          The number of columns of the matrices X and B.
!>

INTEGER, and it's the number of columns of both X and B. twinning. πŸŽ€

A

!>          A is DOUBLE PRECISION array, dimension (LDA,N)
!>          The m-by-n matrix A.
!>

DOUBLE PRECISION array, dimension (LDA,N) β€” the m-by-n matrix A. main character energy. ✨

LDA

!>          LDA is INTEGER
!>          The leading dimension of the array A. LDA >= M.
!>

INTEGER, leading dimension of A, and the rule is LDA >= M. don't break it. πŸ™ˆ

X

!>          X is DOUBLE PRECISION array, dimension (LDX,NRHS)
!>          If TRANS = 'N', the n-by-nrhs matrix X.
!>          If TRANS = 'T', the m-by-nrhs matrix X.
!>

DOUBLE PRECISION array, dimension (LDX,NRHS). if TRANS = 'N' it's the n-by-nrhs X; if TRANS = 'T' it's the m-by-nrhs X. she contains multitudes. πŸ¦‹

LDX

!>          LDX is INTEGER
!>          The leading dimension of the array X.
!>          If TRANS = 'N', LDX >= N.
!>          If TRANS = 'T', LDX >= M.
!>

INTEGER, leading dimension of X. TRANS = 'N' β†’ LDX >= N; TRANS = 'T' β†’ LDX >= M. memorize it bestie. πŸ’œ

B

!>          B is DOUBLE PRECISION array, dimension (LDB,NRHS)
!>          If TRANS = 'N', the m-by-nrhs matrix B.
!>          If TRANS = 'T', the n-by-nrhs matrix B.
!>

DOUBLE PRECISION array, dimension (LDB,NRHS). TRANS = 'N' gives you the m-by-nrhs B; TRANS = 'T' gives you the n-by-nrhs B. slay. πŸ’…

LDB

!>          LDB is INTEGER
!>          The leading dimension of the array B.
!>          If TRANS = 'N', LDB >= M.
!>          If TRANS = 'T', LDB >= N.
!>

INTEGER, leading dimension of B β€” TRANS = 'N' means LDB >= M, TRANS = 'T' means LDB >= N. no cap. πŸ”₯

C

!>          C is DOUBLE PRECISION array, dimension (LDB,NRHS)
!>

DOUBLE PRECISION array, dimension (LDB,NRHS). yep, that's LDB in there, not LDC β€” copying it exactly, iykyk. πŸ“

WORK

!>          WORK is DOUBLE PRECISION array, dimension (LWORK)
!>

DOUBLE PRECISION array, dimension (LWORK). the workspace. she works hard so the routine doesn't have to. 🧚

LWORK

!>          LWORK is INTEGER
!>          The length of the array WORK.  LWORK >= NRHS*(M+N).
!>

INTEGER, the length of WORK, and the requirement is LWORK >= NRHS*(M+N). also there's two spaces before LWORK >= in the original and i'm keeping it because i respect the source. 🫢

πŸ‘‘ Author πŸ‘‘

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

the whole squad behind it. legends only. 🌟

Definition at line 151 of file dqrt17.f.


🌈 Author 🌈

Generated automatically by Doxygen for LAPACK from the source code. (yes bestie, even the docs were generated β€” we love an automated queen. πŸ€–πŸ’–)


heads up: this is a direct-from-source manpage, so everything above is exactly what the routine expects. don't go changing the leading dimensions or LWORK on me β€” that's how you get undefined behaviour and a sad terminal. 😭

and that's the whole page!! πŸ’– this was LAPACK, Version 3.12.0, and the page you're looking at is /home/abui...IN/dqrt17.f(3) β€” go forth and compute that ratio, bestie. periodt. πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from