HP MLIB User's Guide Vol. 1 7th Ed.
114 HP MLIB User’s Guide
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
where is the complex conjugate of s; ifs is real. The vectors can be
stored in one-dimensional arrays or in either rows or columns of
two-dimensional arrays. The indexing through the arrays can be either forward
or backward.
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)
x
i
y
i
cs
s– c
←
x
i
y
i
⋅ for i 1 … n,,=
s ss=