/home/abui...RC/slae2.f(3)
π NAME π
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/slae2.f
Okay bestie, real talk: this page is from the Library Functions Manual, and it's the .3 page for /home/abui...RC/slae2.f(3). So we're deep in the LAPACK build tree, looking at one single Fortran source file β slae2.f β and this is literally its whole documentation. Small file, main character energy. β¨
πΈ SYNOPSIS πΈ
Functions/Subroutines
subroutine SLAE2 (a, b, c, rt1, rt2)β SLAE2 computes the eigenvalues of a 2-by-2 symmetric matrix. That's it, that's the gig. No cap. π
π Function/Subroutine Documentation π
subroutine SLAE2 (real a, real b, real c, real rt1, real rt2)
SLAE2 computes the eigenvalues of a 2-by-2 symmetric matrix. Iconic behavior, honestly. π¦
β¨ Purpose β¨
Okay so picture this matrix, right, and she's symmetric:
[ A B ]
[ B C ]
SLAE2 computes the eigenvalues of that exact 2-by-2 symmetric matrix. On return, RT1 is the eigenvalue of larger absolute value, and RT2 is the eigenvalue of smaller absolute value. Two eigenvalues, one subroutine, zero drama. π«Ά
π Parameters π
AβAis REAL. She's the (1,1) element of the 2-by-2 matrix. πBβBis REAL. The (1,2) and (2,1) elements of the 2-by-2 matrix β yes, both of them, because symmetry said "you're doing double duty today" andBsaid "slay". π₯CβCis REAL. The (2,2) element of the 2-by-2 matrix. πΈRT1βRT1is REAL. The eigenvalue of larger absolute value. πRT2βRT2is REAL. The eigenvalue of smaller absolute value. π
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
π₯ Further Details π₯
RT1is accurate to a few ulps barring over/underflow. Like, she's precise bestie, but only if nothing overflows or underflows β vibe check applies.RT2may be inaccurate if there is massive cancellation in the determinantA*C-B*Bπ β higher precision or correctly rounded or correctly truncated arithmetic would be needed to computeRT2accurately in all cases. So no, she can't always be perfect, and that's on cancellation.- Overflow is possible only if
RT1is within a factor of 5 of overflow. Underflow is harmless if the input data is 0 or exceedsunderflow_threshold / macheps.
β οΈ Bestie please read the Further Details again before you trustRT2blindly. Massive cancellation inA*C-B*Bis the enemy fr fr. π
Definition at line 101 of file slae2.f.
π Author π
Generated automatically by Doxygen for LAPACK from the source code. Not a human, just a robot doing her little documentation chores. π€π
π And that's the whole page!! This absolutely iconic little page came to you courtesy of LAPACK, Version 3.12.0, and she lives at /home/abui...RC/slae2.f(3). Go compute some eigenvalues, queen. ππ
π¦ where this page comes from
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms