 LAPACK  3.10.1 LAPACK: Linear Algebra PACKage

## ◆ crot()

 subroutine crot ( integer N, complex, dimension( * ) CX, integer INCX, complex, dimension( * ) CY, integer INCY, real C, complex S )

CROT applies a plane rotation with real cosine and complex sine to a pair of complex vectors.

Purpose:
``` CROT   applies a plane rotation, where the cos (C) is real and the
sin (S) is complex, and the vectors CX and CY are complex.```
Parameters
 [in] N ``` N is INTEGER The number of elements in the vectors CX and CY.``` [in,out] CX ``` CX is COMPLEX array, dimension (N) On input, the vector X. On output, CX is overwritten with C*X + S*Y.``` [in] INCX ``` INCX is INTEGER The increment between successive values of CX. INCX <> 0.``` [in,out] CY ``` CY is COMPLEX array, dimension (N) On input, the vector Y. On output, CY is overwritten with -CONJG(S)*X + C*Y.``` [in] INCY ``` INCY is INTEGER The increment between successive values of CY. INCX <> 0.``` [in] C ` C is REAL` [in] S ``` S is COMPLEX C and S define a rotation [ C S ] [ -conjg(S) C ] where C*C + S*CONJG(S) = 1.0.```

Definition at line 102 of file crot.f.

103 *
104 * -- LAPACK auxiliary routine --
105 * -- LAPACK is a software package provided by Univ. of Tennessee, --
106 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
107 *
108 * .. Scalar Arguments ..
109  INTEGER INCX, INCY, N
110  REAL C
111  COMPLEX S
112 * ..
113 * .. Array Arguments ..
114  COMPLEX CX( * ), CY( * )
115 * ..
116 *
117 * =====================================================================
118 *
119 * .. Local Scalars ..
120  INTEGER I, IX, IY
121  COMPLEX STEMP
122 * ..
123 * .. Intrinsic Functions ..
124  INTRINSIC conjg
125 * ..
126 * .. Executable Statements ..
127 *
128  IF( n.LE.0 )
129  \$ RETURN
130  IF( incx.EQ.1 .AND. incy.EQ.1 )
131  \$ GO TO 20
132 *
133 * Code for unequal increments or equal increments not equal to 1
134 *
135  ix = 1
136  iy = 1
137  IF( incx.LT.0 )
138  \$ ix = ( -n+1 )*incx + 1
139  IF( incy.LT.0 )
140  \$ iy = ( -n+1 )*incy + 1
141  DO 10 i = 1, n
142  stemp = c*cx( ix ) + s*cy( iy )
143  cy( iy ) = c*cy( iy ) - conjg( s )*cx( ix )
144  cx( ix ) = stemp
145  ix = ix + incx
146  iy = iy + incy
147  10 CONTINUE
148  RETURN
149 *
150 * Code for both increments equal to 1
151 *
152  20 CONTINUE
153  DO 30 i = 1, n
154  stemp = c*cx( i ) + s*cy( i )
155  cy( i ) = c*cy( i ) - conjg( s )*cx( i )
156  cx( i ) = stemp
157  30 CONTINUE
158  RETURN
Here is the caller graph for this function: