Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 7/13/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

?laev2

Computes the eigenvalues and eigenvectors of a 2-by-2 symmetric/Hermitian matrix.

Syntax

call slaev2( a, b, c, rt1, rt2, cs1, sn1 )

call dlaev2( a, b, c, rt1, rt2, cs1, sn1 )

call claev2( a, b, c, rt1, rt2, cs1, sn1 )

call zlaev2( a, b, c, rt1, rt2, cs1, sn1 )

Include Files

  • mkl.fi

Description

The routine performs the eigendecomposition of a 2-by-2 symmetric matrix


Equation

(for claev2/zlaev2).

On return, rt1 is the eigenvalue of larger absolute value, rt2 of smaller absolute value, and (cs1, sn1) is the unit right eigenvector for rt1, giving the decomposition


Equation

(for slaev2/dlaev2),

or


Equation

(for claev2/zlaev2).

Input Parameters

a, b, c

REAL for slaev2

DOUBLE PRECISION for dlaev2

COMPLEX for claev2

DOUBLE COMPLEX for zlaev2.

Elements of the input matrix.

Output Parameters

rt1, rt2

REAL for slaev2/claev2

DOUBLE PRECISION for dlaev2/zlaev2.

Eigenvalues of larger and smaller absolute value, respectively.

cs1

REAL for slaev2/claev2

DOUBLE PRECISION for dlaev2/zlaev2.

sn1

REAL for slaev2

DOUBLE PRECISION for dlaev2

COMPLEX for claev2

DOUBLE COMPLEX for zlaev2.

The vector (cs1, sn1) is the unit right eigenvector for rt1.

Application Notes

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. cs1 and sn1 are accurate to a few ulps barring over/underflow. 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.