SROTG/DROTG/CROTG/ZROTG | Construct Givens rotation |
Name SROTG/DROTG/CROTG/ZROTG
Construct Givens rotation
Purpose Given real or complex scalars a and b, these subprograms construct a Givens plane rotation matrix that annihilates b. Specifically, they determine scalars c and s such that
c s | • | a | = | r |
| b |
| 0 |
where c is real, r and s are of the same type as a and b, and s is the complex conjugate of s.
Usually, c and s are passed to companion subprogram SROT, DROT, CROT, or ZROT to apply the Givens rotation to a pair of vectors.
SROTG and DROTG also determine a quantity z that permits the later stable reconstruction of c and s from a single quantity.
Usage | VECLIB, VECLIB8: |
|
| REAL*4 | a, b, c, s |
| CALL SROTG(a, b, c, s) | |
| REAL*8 | a, b, c, s |
CALL DROTG(a, b, c, s)
| REAL*4 | c |
| COMPLEX*8 | a, b, s |
| CALL CROTG(a, b, c, s) | |
| REAL*8 | c |
| COMPLEX*16 | a, b, s |
| CALL ZROTG(a, b, c, s) | |
Input | a | The scalar a. |
| b | The scalar b. |
118HP MLIB User’s Guide