LAEV2 - 5.2 English - 68552

AOCL API Guide (68552)

Document ID
68552
Release Date
2025-12-29
Version
5.2 English
template<typename T>
void laev2(T *a, T *b, T *c, T *rt1, T *rt2, T *cs1, T *sn1)#

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

Purpose:

   LAEV2 computes the eigendecomposition of a 2-by-2 symmetric matrix
      [  A   B  ]
      [  B   C  ].
   On   return, RT1 is the eigenvalue of larger absolute value, RT2 is the
   eigenvalue of smaller absolute value, and (CS1,SN1) is the unit right
   eigenvector for RT1, giving the decomposition

      [ CS1  SN1 ] [  A   B  ] [ CS1 -SN1 ]  =  [ RT1  0  ]
      [-SN1  CS1 ] [  B   C  ] [ SN1  CS1 ]     [  0  RT2 ].
Parameters:
  • A[in]

    A is REAL

    The (1,1) element of the 2-by-2 matrix.

  • B[in]

    B is REAL

    The (1,2) element and the conjugate of the (2,1) element of the 2-by-2 matrix.

  • C[in]

    C is REAL

    The (2,2) element of the 2-by-2 matrix.

  • RT1[out]

    RT1 is REAL

    The eigenvalue of larger absolute value.

  • RT2[out]

    RT2 is REAL

    The eigenvalue of smaller absolute value.

  • CS1[out] CS1 is REAL

  • SN1[out]

    SN1 is REAL

    The vector (CS1, SN1) is a unit right eigenvector for RT1.

template<typename T, typename Ta>
void laev2(T *a, T *b, T *c, Ta *rt1, Ta *rt2, Ta *cs1, T *sn1)#