lanv2#

Functions

void slanv2(
    f32* a,
    f32* b,
    f32* c,
    f32* d,
    f32* rt1r,
    f32* rt1i,
    f32* rt2r,
    f32* rt2i,
    f32* cs,
    f32* sn
);
void slanv2(f32 *a, f32 *b, f32 *c, f32 *d, f32 *rt1r, f32 *rt1i, f32 *rt2r, f32 *rt2i, f32 *cs, f32 *sn)#

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 +/- sqrt(BB*CC) are complex conjugate eigenvalues.

Parameters

inout
a

On entry, the (1,1) element of the input matrix. On exit, the (1,1) element of the Schur form.

inout
b

On entry, the (1,2) element of the input matrix. On exit, the (1,2) element of the Schur form.

inout
c

On entry, the (2,1) element of the input matrix. On exit, the (2,1) element of the Schur form.

inout
d

On entry, the (2,2) element of the input matrix. On exit, the (2,2) element of the Schur form.

out
rt1r

The real part of the first eigenvalue.

out
rt1i

The imaginary part of the first eigenvalue.

out
rt2r

The real part of the second eigenvalue.

out
rt2i

The imaginary part of the second eigenvalue. If the eigenvalues are a complex conjugate pair, RT1I > 0.

out
cs

Cosine of the rotation matrix.

out
sn

Sine of the rotation matrix.

Functions

void dlanv2(
    f64* a,
    f64* b,
    f64* c,
    f64* d,
    f64* rt1r,
    f64* rt1i,
    f64* rt2r,
    f64* rt2i,
    f64* cs,
    f64* sn
);
void dlanv2(f64 *a, f64 *b, f64 *c, f64 *d, f64 *rt1r, f64 *rt1i, f64 *rt2r, f64 *rt2i, f64 *cs, f64 *sn)#

DLANV2 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 +/- sqrt(BB*CC) are complex conjugate eigenvalues.

Parameters

inout
a

On entry, the (1,1) element of the input matrix. On exit, the (1,1) element of the Schur form.

inout
b

On entry, the (1,2) element of the input matrix. On exit, the (1,2) element of the Schur form.

inout
c

On entry, the (2,1) element of the input matrix. On exit, the (2,1) element of the Schur form.

inout
d

On entry, the (2,2) element of the input matrix. On exit, the (2,2) element of the Schur form.

out
rt1r

The real part of the first eigenvalue.

out
rt1i

The imaginary part of the first eigenvalue.

out
rt2r

The real part of the second eigenvalue.

out
rt2i

The imaginary part of the second eigenvalue. If the eigenvalues are a complex conjugate pair, RT1I > 0.

out
cs

Cosine of the rotation matrix.

out
sn

Sine of the rotation matrix.