lartg#
Functions
-
void slartg(const f32 f, const f32 g, f32 *c, f32 *s, f32 *r)#
SLARTG generates a plane rotation so that.
[ C S ] . [ F ] = [ R ] [ -S C ] [ G ] [ 0 ]
where C**2 + S**2 = 1.
This is a more accurate version of the BLAS1 routine DROTG, with the following other differences: F and G are unchanged on return. If G=0, then C=1 and S=0. If F=0 and (G .ne. 0), then C=0 and S=sign(1,G).
Parameters
infThe first component of vector to be rotated.
ingThe second component of vector to be rotated.
outcThe cosine of the rotation.
outsThe sine of the rotation.
outrThe nonzero component of the rotated vector.
void slartg(
const f32 f,
const f32 g,
f32* c,
f32* s,
f32* r
);
Functions
-
void dlartg(const f64 f, const f64 g, f64 *c, f64 *s, f64 *r)#
DLARTG generates a plane rotation so that.
[ C S ] . [ F ] = [ R ] [ -S C ] [ G ] [ 0 ]
where C**2 + S**2 = 1.
This is a more accurate version of the BLAS1 routine DROTG, with the following other differences: F and G are unchanged on return. If G=0, then C=1 and S=0. If F=0 and (G .ne. 0), then C=0 and S=sign(1,G).
Parameters
infThe first component of vector to be rotated.
ingThe second component of vector to be rotated.
outcThe cosine of the rotation.
outsThe sine of the rotation.
outrThe nonzero component of the rotated vector.
void dlartg(
const f64 f,
const f64 g,
f64* c,
f64* s,
f64* r
);
Functions
-
void clartg(const c64 f, const c64 g, f32 *c, c64 *s, c64 *r)#
CLARTG generates a plane rotation so that.
[ C S ] . [ F ] = [ R ] [ -conjg(S) C ] [ G ] [ 0 ]
where C is real and C**2 + |S|**2 = 1.
The mathematical formulas used for C and S are
sgn(x) = { x / |x|, x != 0 { 1, x = 0
R = sgn(F) * sqrt(|F|**2 + |G|**2)
C = |F| / sqrt(|F|**2 + |G|**2)
S = sgn(F) * conjg(G) / sqrt(|F|**2 + |G|**2)
Special conditions: If G=0, then C=1 and S=0. If F=0, then C=0 and S is chosen so that R is real.
When F and G are real, the formulas simplify to C = F/R and S = G/R, and the returned values of C, S, and R should be identical to those returned by SLARTG.
Parameters
infThe first component of vector to be rotated.
ingThe second component of vector to be rotated.
outcThe cosine of the rotation.
outsThe sine of the rotation.
outrThe nonzero component of the rotated vector.
void clartg(
const c64 f,
const c64 g,
f32* c,
c64* s,
c64* r
);
Functions
-
void zlartg(const c128 f, const c128 g, f64 *c, c128 *s, c128 *r)#
ZLARTG generates a plane rotation so that.
[ C S ] . [ F ] = [ R ] [ -conjg(S) C ] [ G ] [ 0 ]
where C is real and C**2 + |S|**2 = 1.
The mathematical formulas used for C and S are
sgn(x) = { x / |x|, x != 0 { 1, x = 0
R = sgn(F) * sqrt(|F|**2 + |G|**2)
C = |F| / sqrt(|F|**2 + |G|**2)
S = sgn(F) * conjg(G) / sqrt(|F|**2 + |G|**2)
Special conditions: If G=0, then C=1 and S=0. If F=0, then C=0 and S is chosen so that R is real.
When F and G are real, the formulas simplify to C = F/R and S = G/R, and the returned values of C, S, and R should be identical to those returned by DLARTG.
Parameters
infThe first component of vector to be rotated.
ingThe second component of vector to be rotated.
outcThe cosine of the rotation.
outsThe sine of the rotation.
outrThe nonzero component of the rotated vector.
void zlartg(
const c128 f,
const c128 g,
f64* c,
c128* s,
c128* r
);