Intel® oneAPI Math Kernel Library Developer Reference - Fortran
Computes the eigenvalues of a 2-by-2 symmetric matrix.
call slae2( a, b, c, rt1, rt2 )
call dlae2( a, b, c, rt1, rt2 )
The routines sla2/dlae2 compute the eigenvalues of a 2-by-2 symmetric matrix
On return, rt1 is the eigenvalue of larger absolute value, and rt1 is the eigenvalue of smaller absolute value.
REAL for slae2
DOUBLE PRECISION for dlae2
The elements a, b, and c of the 2-by-2 matrix above.
REAL for slae2
DOUBLE PRECISION for dlae2
The computed eigenvalues of larger and smaller absolute value, respectively.
rt1 is accurate to a few ulps barring over/underflow. rt2 may be inaccurate if there is massive cancellation in the determinant a*c-b*b; higher precision or correctly rounded or correctly truncated arithmetic would be needed to compute rt2 accurately in all cases.
Overflow is possible only if rt1 is within a factor of 5 of overflow. Underflow is harmless if the input data is 0 or exceeds
underflow_threshold / macheps.