lasv2#

Functions

void slasv2(
    const f32  f,
    const f32  g,
    const f32  h,
          f32* ssmin,
          f32* ssmax,
          f32* snr,
          f32* csr,
          f32* snl,
          f32* csl
);
void slasv2(const f32 f, const f32 g, const f32 h, f32 *ssmin, f32 *ssmax, f32 *snr, f32 *csr, f32 *snl, f32 *csl)#

SLASV2 computes the singular value decomposition of a 2-by-2 triangular matrix [ F G ] [ 0 H ].

On return, abs(SSMAX) is the larger singular value, abs(SSMIN) is the smaller singular value, and (CSL,SNL) and (CSR,SNR) are the left and right singular vectors for abs(SSMAX), giving the decomposition

[ CSL SNL ] [ F G ] [ CSR -SNR ] = [ SSMAX 0 ] [-SNL CSL ] [ 0 H ] [ SNR CSR ] [ 0 SSMIN ].

Parameters

in
f

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

in
g

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

in
h

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

out
ssmin

abs(SSMIN) is the smaller singular value.

out
ssmax

abs(SSMAX) is the larger singular value.

out
snr

The vector (CSR, SNR) is a unit right singular vector for the singular value abs(SSMAX).

out
csr

The vector (CSR, SNR) is a unit right singular vector for the singular value abs(SSMAX).

out
snl

The vector (CSL, SNL) is a unit left singular vector for the singular value abs(SSMAX).

out
csl

The vector (CSL, SNL) is a unit left singular vector for the singular value abs(SSMAX).

Functions

void dlasv2(
    const f64  f,
    const f64  g,
    const f64  h,
          f64* ssmin,
          f64* ssmax,
          f64* snr,
          f64* csr,
          f64* snl,
          f64* csl
);
void dlasv2(const f64 f, const f64 g, const f64 h, f64 *ssmin, f64 *ssmax, f64 *snr, f64 *csr, f64 *snl, f64 *csl)#

DLASV2 computes the singular value decomposition of a 2-by-2 triangular matrix [ F G ] [ 0 H ].

On return, abs(SSMAX) is the larger singular value, abs(SSMIN) is the smaller singular value, and (CSL,SNL) and (CSR,SNR) are the left and right singular vectors for abs(SSMAX), giving the decomposition

[ CSL SNL ] [ F G ] [ CSR -SNR ] = [ SSMAX 0 ] [-SNL CSL ] [ 0 H ] [ SNR CSR ] [ 0 SSMIN ].

Parameters

in
f

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

in
g

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

in
h

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

out
ssmin

abs(SSMIN) is the smaller singular value.

out
ssmax

abs(SSMAX) is the larger singular value.

out
snr

The vector (CSR, SNR) is a unit right singular vector for the singular value abs(SSMAX).

out
csr

The vector (CSR, SNR) is a unit right singular vector for the singular value abs(SSMAX).

out
snl

The vector (CSL, SNL) is a unit left singular vector for the singular value abs(SSMAX).

out
csl

The vector (CSL, SNL) is a unit left singular vector for the singular value abs(SSMAX).