lag2#

Functions

void slag2(
    const f32* restrict A,
    const INT           lda,
    const f32* restrict B,
    const INT           ldb,
    const f32           safmin,
          f32*          scale1,
          f32*          scale2,
          f32*          wr1,
          f32*          wr2,
          f32*          wi
);
void slag2(const f32 *restrict A, const INT lda, const f32 *restrict B, const INT ldb, const f32 safmin, f32 *scale1, f32 *scale2, f32 *wr1, f32 *wr2, f32 *wi)#

SLAG2 computes the eigenvalues of a 2 x 2 generalized eigenvalue problem A - w B, with scaling as necessary to avoid over-/underflow.

The scaling factor “s” results in a modified eigenvalue equation

s A - w B
where s is a non-negative scaling factor chosen so that w, w B, and s A do not overflow and, if possible, do not underflow, either.

Parameters

in
A

2x2 matrix A. It is assumed that its 1-norm is less than 1/SAFMIN.

in
lda

Leading dimension of A. lda >= 2.

in
B

2x2 upper triangular matrix B.

in
ldb

Leading dimension of B. ldb >= 2.

in
safmin

The smallest positive number s.t. 1/SAFMIN does not overflow.

out
scale1

Scaling factor for the first eigenvalue.

out
scale2

Scaling factor for the second eigenvalue.

out
wr1

Real part of the first eigenvalue (scaled by scale1).

out
wr2

Real part of the second eigenvalue (scaled by scale2).

out
wi

Imaginary part of eigenvalues (scaled by scale1). Non-negative.

Functions

void dlag2(
    const f64* restrict A,
    const INT           lda,
    const f64* restrict B,
    const INT           ldb,
    const f64           safmin,
          f64*          scale1,
          f64*          scale2,
          f64*          wr1,
          f64*          wr2,
          f64*          wi
);
void dlag2(const f64 *restrict A, const INT lda, const f64 *restrict B, const INT ldb, const f64 safmin, f64 *scale1, f64 *scale2, f64 *wr1, f64 *wr2, f64 *wi)#

DLAG2 computes the eigenvalues of a 2 x 2 generalized eigenvalue problem A - w B, with scaling as necessary to avoid over-/underflow.

The scaling factor “s” results in a modified eigenvalue equation

s A - w B
where s is a non-negative scaling factor chosen so that w, w B, and s A do not overflow and, if possible, do not underflow, either.

Parameters

in
A

2x2 matrix A. It is assumed that its 1-norm is less than 1/SAFMIN.

in
lda

Leading dimension of A. lda >= 2.

in
B

2x2 upper triangular matrix B.

in
ldb

Leading dimension of B. ldb >= 2.

in
safmin

The smallest positive number s.t. 1/SAFMIN does not overflow.

out
scale1

Scaling factor for the first eigenvalue.

out
scale2

Scaling factor for the second eigenvalue.

out
wr1

Real part of the first eigenvalue (scaled by scale1).

out
wr2

Real part of the second eigenvalue (scaled by scale2).

out
wi

Imaginary part of eigenvalues (scaled by scale1). Non-negative.