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 REAL
  • B β€” B is REAL
  • C β€” C is REAL
  • D β€” 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, your A, B, C, D are gone-gone, she's a main character who changes the plot πŸ™ˆ
  • RT1R β€” RT1R is REAL
  • RT1I β€” RT1I is REAL
  • RT2R β€” RT2R is REAL
  • RT2I β€” 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 REAL
  • SN β€” 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