SROT/DROT/CROT/CSROT/ZROT/ZDROT | Apply Givens rotation |
Name SROT/DROT/CROT/CSROT/ZROT/ZDROT
Apply Givens rotation
Purpose Given a real scalar c, a real or complex scalar, s and real or complex vectors x
and y of length n, these subprograms apply the Givens rotation
| xi | ← |
| c | s | ⋅ | xi | for i = 1, …, n |
| yi | c | yi | |||||
where s | is the complex conjugate of s; s = s if s is real. The vectors can be |
stored in
Usually, c and s have been determined by the companion subprogram SROTG, DROTG, CROTG, or ZROTG.
Usage | VECLIB: |
|
| INTEGER*4 | n, incx, incy |
| REAL*4 | x(lenx), y(leny), c, s |
| CALL SROT(n, x, incx, y, incy, c, s) | |
| INTEGER*4 | n, incx, incy |
| REAL*8 | x(lenx), y(leny), c, s |
| CALL DROT(n, x, incx, y, incy, c, s) | |
| INTEGER*4 | n, incx, incy |
| REAL*4 | c |
| COMPLEX*8 | x(lenx), y(leny), s |
| CALL CROT(n, x, incx, y, incy, c, s) | |
| INTEGER*4 | n, incx, incy |
| REAL*4 | c, s |
| COMPLEX*8 | x(lenx), y(leny) |
CALL CSROT(n, x, incx, y, incy, c, s)
INTEGER*4 | n, incx, incy |
REAL*8 | c |
COMPLEX*16 | x(lenx), y(leny), s |
CALL ZROT(n, x, incx, y, incy, c, s)
114HP MLIB User’s Guide