HP MLIB User's Guide Vol. 1 7th Ed.

174 HP MLIB User’s Guide
F_SGEN_GROT/F_DGEN_GROT/F_CGEN_GROT/F_ZGEN_GROT Generate Givens rotation
Name F_SGEN_GROT/F_DGEN_GROT/F_CGEN_GROT/F_ZGEN_GROT
Generate Givens rotation
Purpose F_xGEN_GROT constructs a Givens plane rotation so that
where c is always a real scalar and
The scalars a and b are unchanged on exit. If b is equal to zero, then the pair
(c,s) is chosen to be equal to (1, 0). Otherwise, when a and b are real scalars and
a is equal to zero, the pair (c,s) is chosen to be equal to (0, 1); when a and b are
complex scalars and a is equal to zero, c is chosen to be zero and s is chosen so
that r is real.
Usage VECLIB, VECLIB8
REAL*4 C
REAL*4 A, B, R, S
SUBROUTINE F_SGEN_GROT (A, B, C, S, R)
REAL*8 C
REAL*8 A, B, R, S
SUBROUTINE F_DGEN_GROT (A, B, C, S, R)
REAL*4 C
COMPLEX*8 A, B, R, S
SUBROUTINE F_CGEN_GROT (A, B, C, S, R)
REAL*8 C
COMPLEX*16 A, B, R, S
SUBROUTINE F_ZGEN_GROT (A, B, C, S, R)
Input A REAL or COMPLEX scalar. A is unchanged on exit.
B REAL or COMPLEX scalar. B is unchanged on exit.
Output C REAL scalar.
R The REAL or COMPLEX product of the operation.
S REAL or COMPLEX scalar.
cs
s c
a
b
r
0
=
c
2
s
2
+1=
csr,,()rot a b,()