SRC/slanv2.f(3)
π SRC/slanv2.f β like, the whole entire thing
okay so this page lives in the Library Functions Manual and bestie, it's literally one subroutine and it's iconic. let's get into it π
β¨ NAME β¨
SRC/slanv2.f β yes that's it, that's the name, she's mysterious like that π
πΈ SYNOPSIS πΈ
π¦ Functions/Subroutines
subroutine slanv2 (a, b, c, d, rt1r, rt1i, rt2r, rt2i, cs, sn)β SLANV2 computes the Schur factorization of a real 2-by-2 nonsymmetric matrix in standard form. no cap, that's the whole gig π«Ά
π Function/Subroutine Documentation π
β subroutine slanv2 (real a, real b, real c, real d, real rt1r, real rt1i, real rt2r, real rt2i, real cs, real sn)
SLANV2 computes the Schur factorization of a real 2-by-2 nonsymmetric matrix in standard form. that's the summary, and honestly? she ate π₯
π Purpose:
!>
!> SLANV2 computes the Schur factorization of a real 2-by-2 nonsymmetric
!> matrix in standard form:
!>
!> [ A B ] = [ CS -SN ] [ AA BB ] [ CS SN ]
!> [ C D ] [ SN CS ] [ CC DD ] [-SN CS ]
!>
!> where either
!> 1) CC = 0 so that AA and DD are real eigenvalues of the matrix, or
!> 2) AA = DD and BB*CC < 0, so that AA + or - sqrt(BB*CC) are complex
!> conjugate eigenvalues.
!>
so like. it rotates your matrix into a cute little standard form. either the bottom-left corner CC becomes 0 and AA and DD are your real eigenvalues, or you get AA = DD with BB*CC < 0 and then AA + or - sqrt(BB*CC) are your complex conjugate eigenvalues. two vibes, both valid π
π Parameters π
AβA is REALBβB is REALCβC is REALDβD is REAL. on entry, these are the elements of the input matrix. on exit? they get overwritten by the elements of the standardised Schur form. so yeah, yourA,B,C,Dare gone-gone, she's a main character who changes the plot πRT1RβRT1R is REALRT1IβRT1I is REALRT2RβRT2R is REALRT2IβRT2I is REAL. these four are the real and imaginary parts of the eigenvalues. heads up: if the eigenvalues are a complex conjugate pair,RT1I > 0β that's a strict greater-than, not a maybe πCSβCS is REALSNβSN is REAL. parameters of the rotation matrix. the[ CS -SN ; SN CS ]girlies from the Purpose section. slay π§
π Author π
these absolute legends:
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
π Further Details:
!>
!> Modified by V. Sima, Research Institute for Informatics, Bucharest,
!> Romania, to reduce the risk of cancellation errors,
!> when computing real eigenvalues, and to ensure, if possible, that
!> abs(RT1R) >= abs(RT2R).
!>
so V. Sima from the Research Institute for Informatics, Bucharest, Romania came through and modified it to reduce the risk of cancellation errors when computing real eigenvalues, and to make sure (if possible!) that abs(RT1R) >= abs(RT2R). lowkey a hero π
also: Definition at line 126 of file slanv2.f. noted, bookmarked, memorized β¨
π« Author π«
Generated automatically by Doxygen for LAPACK from the source code. not a human, just a robot doing her best π«Ά
and that's the page!! π shoutout to LAPACK, Version 3.12.0 for making it all happen β you're doing amazing sweetie, mwah πβ¨πΈ
π¦ 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