TESTING/LIN/sqrt17.f(3)
๐ธ TESTING/LIN/sqrt17.f(3) ๐ธ
okay bestie, so this one's a page from Library Functions Manual โ yes, we're in the mood, we're reading a Fortran manpage ๐ and honestly? she kinda ate. Let's get into it.
โจ NAME โจ
TESTING/LIN/sqrt17.f โ like, that's literally her. that's the whole name. no notes. ๐
๐ฆ SYNOPSIS ๐ฆ
Functions/Subroutines
real function sqrt17 (trans, iresid, m, n, nrhs, a, lda, x, ldx, b, ldb, c, work, lwork)โ SQRT17 ๐
๐ Function/Subroutine Documentation ๐
๐ the signature (copy it exactly, i'm not kidding) ๐
real function sqrt17 (character trans, integer iresid, integer m, integer n,
integer nrhs, real, dimension( lda, * ) a, integer lda, real, dimension(
ldx, * ) x, integer ldx, real, dimension( ldb, * ) b, integer ldb, real,
dimension( ldb, * ) c, real, dimension( lwork ) work, integer lwork)
SQRT17 โ that's her name, that's her whole vibe. ๐ซถ
๐งฎ Purpose ๐งฎ
okay so listen, this function is out here computing a ratio, and it's giving very much "math girlboss":
norm(R**T * op(A)) / ( norm(A) * alpha * max(M,N,NRHS) * EPS ),
where the residual R = B - op(A)*X, and op(A) is either A or A**T depending on TRANS. EPS is the machine epsilon (slay ๐
), and then:
alpha = norm(B) if IRESID = 1 (zero-residual problem)
alpha = norm(R) if IRESID = 2 (otherwise).
and the norm in question? the 1-norm. iconic. periodt. ๐ฅ
๐ Parameters ๐
TRANSโ she's aCHARACTER*1and she decides whether the transpose ofAgets used or not:= 'N': no transpose, soop(A) = A. easy. ๐= 'T': transpose, soop(A) = A**T. spicy. ๐ถ๏ธ
IRESIDโ anINTEGER, and honestly she's just here to label your situation:IRESID = 1means zero-residual problem ๐IRESID = 2means non-zero residual ๐ญ
MโINTEGER, the number of rows of the matrixA. but also, plot twist:- if
TRANS = 'N', it's the number of rows of the matrixB - if
TRANS = 'T', it's the number of rows of the matrixX
- if
NโINTEGER, the number of columns of the matrixA. and again, the plot thickens:- if
TRANS = 'N', it's the number of rows of the matrixX - if
TRANS = 'T', it's the number of rows of the matrixB
- if
NRHSโINTEGER, the number of columns of the matricesXandB. that's it. that's her job. ๐AโREAL array, dimension (LDA,N)โ them-by-nmatrixA. main character energy, honestly. ๐LDAโINTEGER, the leading dimension of the arrayA. constraint:LDA >= M. don't test her. โญXโREAL array, dimension (LDX,NRHS):- if
TRANS = 'N', it's then-by-nrhsmatrixX - if
TRANS = 'T', it's them-by-nrhsmatrixX
- if
LDXโINTEGER, the leading dimension of the arrayX:- if
TRANS = 'N', thenLDX >= N - if
TRANS = 'T', thenLDX >= M
- if
BโREAL array, dimension (LDB,NRHS):- if
TRANS = 'N', it's them-by-nrhsmatrixB - if
TRANS = 'T', it's then-by-nrhsmatrixB
- if
LDBโINTEGER, the leading dimension of the arrayB:- if
TRANS = 'N', thenLDB >= M - if
TRANS = 'T', thenLDB >= N
- if
CโREAL array, dimension (LDB,NRHS). no further commentary from the source, she's mysterious like that. ๐WORKโREAL array, dimension (LWORK). the workspace. the grind. ๐LWORKโINTEGER, the length of the arrayWORK. constraint:LWORK >= NRHS*(M+N). respect it. ๐ฅ
ngl bestie, those dimension constraints are not a suggestion. if you getLDA,LDX,LDBorLWORKwrong you're gonna have a bad time. ๐ญ
๐ Author ๐
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 151 of file sqrt17.f. (yes, line one-fifty-one, we checked ๐
)
๐ธ Author ๐ธ
Generated automatically by Doxygen for LAPACK from the source code. she's auto-generated but she's still that girl. โจ
okay and finally, the cute sign-off you asked for ๐ซถ โ this whole thing is from LAPACK, Version 3.12.0, and the page is TESTING/LIN/sqrt17.f(3). go forth and compute your ratios, bestie. ๐๐๐ฆ
๐ฆ 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