lartgp#

Functions

void slartgp(
    const f32  f,
    const f32  g,
          f32* cs,
          f32* sn,
          f32* r
);
void slartgp(const f32 f, const f32 g, f32 *cs, f32 *sn, f32 *r)#

SLARTGP generates a plane rotation so that.

[ CS SN ] . [ F ] = [ R ] where CS**2 + SN**2 = 1. [ -SN CS ] [ G ] [ 0 ]

This is a slower, more accurate version of the Level 1 BLAS routine DROTG, with the following other differences: F and G are unchanged on return. If G=0, then CS=(+/-)1 and SN=0. If F=0 and (G .ne. 0), then CS=0 and SN=(+/-)1.

The sign is chosen so that R >= 0.

Parameters

in
f

The first component of vector to be rotated.

in
g

The second component of vector to be rotated.

out
cs

The cosine of the rotation.

out
sn

The sine of the rotation.

out
r

The nonzero component of the rotated vector.

Functions

void dlartgp(
    const f64  f,
    const f64  g,
          f64* cs,
          f64* sn,
          f64* r
);
void dlartgp(const f64 f, const f64 g, f64 *cs, f64 *sn, f64 *r)#

DLARTGP generates a plane rotation so that.

[ CS SN ] . [ F ] = [ R ] where CS**2 + SN**2 = 1. [ -SN CS ] [ G ] [ 0 ]

This is a slower, more accurate version of the Level 1 BLAS routine DROTG, with the following other differences: F and G are unchanged on return. If G=0, then CS=(+/-)1 and SN=0. If F=0 and (G .ne. 0), then CS=0 and SN=(+/-)1.

The sign is chosen so that R >= 0.

Parameters

in
f

The first component of vector to be rotated.

in
g

The second component of vector to be rotated.

out
cs

The cosine of the rotation.

out
sn

The sine of the rotation.

out
r

The nonzero component of the rotated vector.